Re: Drawing



You may want to use gnome canvas instead which will provide you with many primitives and many ore features. Have a look in the gnome documentation.

Hello All,

please, help me with some basic problems, related to drawing.

What I want is to draw some things on the drawing_area with a certain
color - red rectangle, for example.

this is what I wrote in expose_event handler:

...
GdkDrawable * hWnd = widget->window;
GkdGC * hDC = widget->style->fg_gc[ GTK_WIDGET_STATE( widget ) ];
GdkColor color;
gdk_color_parse( "FF0000", &color );
gdk_gc_set_foreground( hDC, &color );
gdk_draw_rectangle( hWnd, hDC, 0, 0, 0, 30, 30 );

I get this rectangle, but of lilac color, and all other widgets in a
window became lilac ...

What I need to have only my rectangle in the drawing_area with a red
color and then, for example, some line there in any other color ?





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