how to get colors other than balck_gc and white_gc?



I am developing an applications that has integrated a little drawing
program .  I would like to use eight colors (black, white, red, green,
blue, yellow, cyan, magenta).
Right now I use the following in my code to get black and white:

snip ---

gdk_draw_rectangle (pixmap,
   widget->style->black_gc,
   TRUE,
   update_rect.x, update_rect.y,
   update_rect.width, update_rect.height);

gdk_draw_rectangle (pixmap,
   widget->style->white_gc,
   TRUE,
   update_rect.x, update_rect.y,
   update_rect.width, update_rect.height);

snip ---

(black_gc and white_gc are given)

How can I get other colors than black and white?

Thank you very much.

-- Thomas Amsler

"Imagination is more important than knowledge."
        --Albert Einstein







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