* Source/NSImage.m: Implement -bestRepresentationForRect:context:hints:,

which chooses the smallest rep larger than or equal to the provided size.

Modify -nativeDrawInRect:... to use the above method for choosing a rep.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33304 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-06-14 19:00:23 +00:00
parent d0b58a4fd4
commit 37ceff2824
3 changed files with 78 additions and 4 deletions

View file

@ -284,6 +284,17 @@ typedef enum {
* place and finds the best representation.
*/
- (NSImageRep*) bestRepresentationForDevice: (NSDictionary*)deviceDescription;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
/**
* Finds the best representation for drawing in the specified rect.
*
* context and hints are currently ignored.
*/
- (NSImageRep *)bestRepresentationForRect: (NSRect)rect
context: (NSGraphicsContext *)context
hints: (NSDictionary *)hints;
#endif
- (NSArray*) representations;
/** Remove the NSImageRep imageRep from the NSImage's representations