NewbieQ: Changing color on drawing primitives
- From: Jev <jev ecad org>
- To: gtk-app-devel-list gnome org
- Subject: NewbieQ: Changing color on drawing primitives
- Date: Tue, 17 Jul 2001 21:12:19 +0100
Hello all,
I have been looking and mangling the scribble example program, my
objective is to just draw simple shapes to a drawable, at this point im
not worried about being able to draw with the cursor, just drawing
rectangles and such.
I want to change the color of a rectangle, in the scribble example,
'widget->style->black_gc' is used for the second argument of
gdk_draw_line(), which unsurprisingly draws a black rectangle, I have
changed this to white_gc with success, but not any other colors.
I would like to know what to define more colors in the GdkGC structure,
Im confused as to how the 'widget' structure got created in the first
place, is 'widget->style->black_gc' (and white) default?
An example code snippet would be greatly appreciated :)
Thanks,
-Jev
--
http://www.ecad.org/~jev/jev.gpg
Key fingerprint = 748B 2346 1683 6384 5E8D 4EE3 0807 EADB 999E AB95
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]