Re: Clearing drawing area window to blue



On Tue, 8 Oct 2002, Filip Van Raemdonck wrote:

[snip]

Is this GTK 1 or GTK 2? I suppose GTK 1 since you're using
gtk_signal_connect, am I right?

Yes, gtk-1.2

* does adding a gdk_rgb_init call after gnome_init change anything?

Yes, I can get the test pattern (from the code shown in gdk-gdkrgb.html),
but it uses an rgb buffer and I'm drawing into a pixbuf, then copying the
pixbuf into the drawing area window.

I don't see a connection between an rgb buffer and a pixbuf.  Maybe I'm
overlooking something?  Can one use the gdk_draw_pixmap function with an
rgb buffer?

What I'm trying to do is fill the pixbuf with blue pixels, then copy the
pixbuf to the drawing area window.

Later on I'll be drawing lines (using gdk_draw_lines) in a different color
onto the blue background.  So eventually I'll need to learn how to set the
color of the pen with which the lines are to be drawn (presumably the
foreground color in some graphics context).  The Amiga has a function
called SetAPen which does that, and I'll need a similar function in
gtk/gdk.

Bryan (who's apparently full of novice questions)


*---------------------------------------------------------------
* Bryan Brown      <*>              bbrown radix net
* http://www.radix.net/~bbrown
*---------------------------------------------------------------




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