Re: Re: Not understanding the principles of drawing areas and primitives etc... Colors?

2006-03-11 Thread Leo -
I think I can grasp the GC idea; it's just a way to reduce the number of parameters sent to certain functions, but where do I get the colors from? When I check up on gdk_gc_set_foreground etc. they require a gdkColor parameter, and following that link (clicking gdkColor) gets me to a page about

Re: Not understanding the principles of drawing areas and primitives etc... Colors?

2006-03-11 Thread [EMAIL PROTECTED]
Whether it is or not, it would be nice if somebody could give me a (c language) source snippet on how to set up colors and colormaps for a widget and then draw a red line on it... It's pretty simple, but I do not and will not willingly use C. Here's an example which draws lines, rectangles,

Re: Not understanding the principles of drawing areas and primitives etc... Colors?

2006-03-11 Thread Richard Boaz
you can follow this basic algorithm, (there are many ways to effect this, this is just one that works and is, hopefully, descriptive):// set up colors and some GCsGdkColor red, black;GdkGC *gc, *inverse_gc;gc = gdk_gc_new(window); // regular GC for the windowinverse_gc = gdk_gc_new(window); //

Not understanding the principles of drawing areas and primitives etc...

2006-03-09 Thread Leo -
I want to be able to draw lines on a gtkDrawingArea, with a color the user selects (r,g,b), however I don't understand how I would do. The whole business with gdkGC's and gdcColors seems very alien. If somebody could point me to a tutorial (the scribble one isn't enough since that one doesn't use

Re: Not understanding the principles of drawing areas and primitives etc...

2006-03-09 Thread Paul Davis
On Thu, 2006-03-09 at 19:39 +0100, Leo - wrote: I want to be able to draw lines on a gtkDrawingArea, with a color the user selects (r,g,b), however I don't understand how I would do. The whole business with gdkGC's and gdcColors seems very alien. If somebody could point me to a tutorial (the