Re: [gtkmm] Gdk::Color - can't understand



Secil Ayaz wrote:

Explain me, why values in Gdk::Color::set_rgb(red, green, blue) must be
2-byte

Explain me, why values in Gdk::Color::set_rgb(red, green, blue) must be
2-byte
values? I mean, that to produce a 0x3fafc0 color I have to write it as
set_rgb(0x3fff, 0xafff, 0xc0ff), adding one extra byte to every color
component.

Maybe to cover all formats of colors ans keep it platform independent
(scanner, printer, ...)
(incl. alpha and other stuff) in GdkColor.
I have no prolems with 2 bytes per color unit.
Well, but I do. When I pick up colors from my windows version of a program,
Gimp shows me only byte-sized values, so I wonder if I had to append to it
a 00-byte or 0xFF-byte - I don't notice the difference, but may be someone can.

And next, from reading gtkmm and gtk documentation I nevertheless can't
understand whether I really do need colormap or just can easily live on
with Gdk::Drawable::set_rgb_foreground() to draw my rectangles and lines
on a drawingarea.

Yes indeed. GTK was designed for a Graphic Manipulation Program.
You don't need a colormap, if you don't feel so.

That's good, then.
   Thanks for the answer.
      Igor Gorbounov




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