mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:20:38 +00:00
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:
parent
fd4d577fa7
commit
8e4ca1e17e
2 changed files with 14 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue