GdkRgb Colormap usage ..

I am trying to use gdkrgb colormap and have the following usage questions:
1.what is the right way of using gdk_rgb ? 
i.e If i intialize the colormap using gdk_rgb_init, should i call gdk_rgb_xpixel_from_rgb() to get the xpixel Or can i call gdk_color_alloc().
When i skimmed through the code, seems like "init" func would  allocate and store  a  finite set of colors(based on the colorcude height)
2. If I have to use gdk_rgb_xpixel_from_rgb(), how do I package the r, g, b into guint32
Is it :
RGB(r,g,b) (((r&0xFF)<<24) | ((g&0xFF)<<16) | ((b&0xFF)<<8)) ?

Any help/suggestions is appreciated 


V G Prasad
Off: (508) 870 -0300 ext 294
Fax: (508) 366 -4873 

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