xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XForms] FL_PACK Question.


From: Serge Bromow
Subject: [XForms] FL_PACK Question.
Date: Fri, 18 Mar 2016 17:28:58 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

Hello to All,

I have used the FL_PACK macro for years to convert R,G,B values to unsigned long decimal for use with XSetWindowBackground.

All of a sudden it no longer works. Possibly as a result of moving to a 64bit OS. When I look at the definition in forms.h It appears the Red and Blue colour shift values are revered. i.e;

#define FL_RMASK           0x000000ff
#define FL_RSHIFT          0
#define FL_GMASK           0x0000ff00
#define FL_GSHIFT          8
#define FL_BMASK           0x00ff0000
#define FL_BSHIFT          16

I believe it should be;

#define FL_RMASK           0x00ff0000
#define FL_RSHIFT          16
#define FL_GMASK           0x0000ff00
#define FL_GSHIFT          8
#define FL_BMASK           0x000000ff
#define FL_BSHIFT          0

Am I missing something?

For the moment I am using;

decimal_colour = (r << 16) + (g << 8) + (b);

Thanks,

Serge
--
Serge Bromow

DineAmix Inc.
<address@hidden>
(613) 260-8629
888 411-6636
Ottawa, Canada.

Please Consider the Environment before Printing the E-Mail. 

IMPORTANT NOTICE: This message is intended only for the use of the individual or entity to which it is addressed.
The message may contain information that is privileged, confidential and exempt from disclosure under applicable law.
If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient,
you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify DineAmix Inc. immediately by email at address@hidden.


Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]