GC's
- From: Alexandre Mathy <ardm2 cam ac uk>
- To: gtk-list gnome org
- Subject: GC's
- Date: 29 Jun 2001 01:56:16 +0000
Hey,
I'm trying to get the hang of GdkGC's but I can't find any decent
documentation...
For example, if I wanted to draw something in, say, red on a pixmap, how
would I go about that?
I currently
do this, but it doesn't seem to work
GdkGc selectedGC;
//I think the following line is the problem
// I have tried this with the pixmap instead of widget->window
// but then the colormap is null.. with this code, nothing happens
GdkColormap *cmap = gdk_window_get_colormap (widget->window);
GdkColor cred;
cred.red =1.0;
cred.green = 0;
cred.blue = 0;
gdk_color_alloc (cmap, &cred);
selectedGC = gdk_gc_new (pictureBuff);
gdk_gc_set_foreground (selectedGC, &cred);
cheers,
Alex Mathy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]