Re: GtkColorButton Deprecation



On Sat, 2013-04-13 at 00:33 +0200, Lanoxx wrote:


         "{"\
         0x2e2e, 0x3434, 0x3636,\
         0xcccc, 0x0000, 0x0000,\
         0x4e4e, 0x9a9a, 0x0606,\

Would this be acceptable?

#define C(x) ((x) / 65535.0)

{
  C(0x2e2e), C(0x3434), C(0x3636),
  C(0xcccc), C(0x0000), C(0x0000),
...

Or row-wise:

#define COLOR(r, g, b) (r) / 65535.0, (g) / 65535.0, (b) / 65535.0

{
  COLOR (0x2e2e, 0x3434, 0x3636),
  COLOR (0xcccc, 0x0000, 0x0000),
...

Hmm, I think I like this second one better.

  Federico



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