* Source/NSImage.m (-nativeDrawInRect:...): Compute the rep size

after the nil test.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33513 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-07-11 09:41:47 +00:00
parent 727e1993f0
commit f13ac2cd84
2 changed files with 6 additions and 3 deletions

View file

@ -934,7 +934,6 @@ behavior precisely matches Cocoa. */
{
NSGraphicsContext *ctxt = GSCurrentContext();
NSSize imgSize = [self size];
NSSize repSize;
float widthScaleFactor;
float heightScaleFactor;
NSImageRep *rep;
@ -954,8 +953,6 @@ behavior precisely matches Cocoa. */
rep = [self bestRepresentationForRect: dstRect
context: nil
hints: nil];
repSize = [rep size];
if (rep == nil)
return;
@ -1018,6 +1015,7 @@ behavior precisely matches Cocoa. */
int gState;
/* The context of the cache window */
NSGraphicsContext *cacheCtxt;
NSSize repSize = [rep size];
/* The size of the cache window that will hold the scaled image */
NSSize cacheSize = [[ctxt GSCurrentCTM] transformSize: repSize];