Fix color wheel color picker to display correct image on big endian

machines.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31901 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2011-01-16 23:21:08 +00:00
parent fd4d577fa7
commit 8e4ca1e17e
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2011-01-17 Wolfgang Lux <wolfgang.lux@gmail.com>
* ColorPickers/GSWheelColorPicker.m (-regenerateImage):
Fix to correctly display color wheel image on big endian
machines.
2011-01-16 00:32-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSApplication.m: Added overide for orderWindow:relativeTo:

View file

@ -255,7 +255,7 @@
v = brightness;
}
// caluclate R,G,B from h,s,v
// calculate R,G,B from h,s,v
{
int I = (int)(h * 6);
CGFloat V = v;
@ -289,10 +289,17 @@
B *= A;
// store pixel
#if GS_WORDS_BIGENDIAN
row[x] = ((uint32_t)(255 * R) << 24)
| (((uint32_t)(255 * G)) << 16)
| (((uint32_t)(255 * B)) << 8)
| (((uint32_t)(255 * A)));
#else
row[x] = ((uint32_t)(255 * R))
| (((uint32_t)(255 * G)) << 8)
| (((uint32_t)(255 * B)) << 16)
| (((uint32_t)(255 * A)) << 24);
#endif
}
}