colors and drawing



I'm looking for the easy way for changing pen colors for drawing.
I currently do :
  guint32         white   = 0x00ffffff;
  guint32         cyan    = 0x000fffff;
  guint32         black   = 0x00000000;


gdk_draw_polygon(pixmap,gc,FALSE,gpts,npts);


I'm in need of 16 colors in this format.

I found :
typedef struct {
    const char *name;
    unsigned char red;
    unsigned char green;
    unsigned char blue;
} ColorEntry;

static ColorEntry xColors[] = {
    { "alice blue", 240, 248, 255 },
    { "AliceBlue", 240, 248, 255 },
    { "antique white", 250, 235, 215 },
...


But am not sure how to get this to the screen.


Does anyone have 16+ colors as the gint32 I have above.
I don't even know where I got these from. 




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