Re: Drawing two filled rectangles with colors



On Thu, 2007-04-05 at 11:31 -0300, j romildo gmail com wrote:
> Hi.
> 
> I am having difficulties writing a simple demo program that draws two
> filled rectangles with different colors in a drawing area. More
> precisely, I am not sure how to deal with the colors. Maybe someone
> would write the demo and post it here.

If you check with the gtk-demo example program that ships with GTK,
you'll find a GtkDrawingArea demo, complete with source code.  It
illustrates (in the checkerboard_expose() function) how to create GtkGC
objects that set the color, which you then use in the drawing functions.
You'll also want to look up the documentation on the GtkGC class, as the
GC objects contain other attributes like pen style, fill colors, etc.

> 
> Regards,
> 
> JoséRomildo
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 




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