diff --git a/ChangeLog b/ChangeLog index c475ea87c..f661f5c2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-12-12 Eric Wasylishen + + * Source/NSBitmapImageRep.m: + * Source/GSThemeTools.m: + Change the colorAtX:y: and related methods in NSBitmapImageRep + to use flipped coordinates, matching OS X. colorAtX:0 y:0 now + returns the top-left pixel instead of the bottom left. + 2009-12-12 Fred Kiefer * Source/NSApplication (-setWindowsMenu:): Only add windows that diff --git a/Source/GSThemeTools.m b/Source/GSThemeTools.m index af5d0e007..d931d4c2a 100644 --- a/Source/GSThemeTools.m +++ b/Source/GSThemeTools.m @@ -791,7 +791,7 @@ withRepeatedImage: (NSImage*)image for (i = 0; i < s.width; i++) { - NSColor *pixelColor = [rep colorAtX: i y: s.height - 1]; + NSColor *pixelColor = [rep colorAtX: i y: 0]; [pixelColor getRed: &r green: &g blue: &b alpha: &a]; if (a > 0 && x1 == -1) diff --git a/Source/NSBitmapImageRep.m b/Source/NSBitmapImageRep.m index c10b045d0..49ab821e7 100644 --- a/Source/NSBitmapImageRep.m +++ b/Source/NSBitmapImageRep.m @@ -756,6 +756,10 @@ _get_bit_value(unsigned char *base, long msb_off, int bit_width) return value & ((1<