SBP
unread,Mar 20, 2016, 7:01:47 PM3/20/16You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to xforms-de...@nongnu.org
Hi there
I use the FL_GETR,FL_GETG,FL_GETB macros to extract color components
from a FL_PACK type in a 64 bit OS and it works just fine. I use these
to store static color lookup tables by using FL_PACK(r,g,b) and the
aforementioned macros afterwards. However, when obtaining a color value
via XGetPixel I have to use the macros in the opposite order indeed,
FL_GETB for red component, etc.
I believe these macros are supposed to be used in a consistent manner
with FL_PACK, not for direct Xlib programming. I don't know why
changing from 32 to 64 bits would make a difference, maybe that's
something to do with X11 (or a change of endianness?). I'm no expert,
but I'd recommend using something more Xlib-specific for dealing with
colors in Xlib. XQueryColor seems to be the right way to get the
components, as it considers the Xlib colormap as well.
Cheers!
SBP