[Gtk-sharp-list] Setting the drawing color in DrawingArea
Stefan Saring
stefan.saring@epost.de
12 Feb 2003 22:10:11 +0100
Hi,
can somebody tell me how to set the drawing color in an DrawingArea ? I
tried it in different ways, but nothing works.
This is one way I've tried (daDiagram is a DrawingArea, pmDiagram is the
Pixmap object within):
Gdk.Color colRed = new Gdk.Color ();
colRed.red = 60000;
colRed.green = 0;
colRed.blue = 0;
daDiagram.Colormap.AllocColor (colRed, true, true);
Gdk.GC gcRed = new Gdk.GC (pmDiagram);
gcRed.Foreground = colRed;
pmDiagram.DrawLine (gcRed, 0, 0, 100, 100);
The line is always black. What am I doing wrong ?
Thanks !
Stefan