Re: gtkdrawing x gtkpixmap



On Qua, 2003-03-12 at 01:30, Brandon wrote:
I'm glad you asked this question. I've asked similar questions at least
2 times and never got any help on it. ALl I want to do is draw points
onto a drawing area without relying on widget events occurring first
(ie. not relying on signal callbacks that contain drawing functions) and
no one seems to want to respond. Maybe you will have better luck.

  No one seems to respond because it is not possible :-)

  To do as you want you would need a new widget, a simplified version of
GtkDrawingArea.

  If all you want is to draw points, a possible approach would be:
        1. Create a GdkPixbuf;
        2. Create a GtkImage, instructing it to use the pixbuf you created, but
you keep your own reference to the pixbuf;
        3. Draw directly to the pixbuf;
        4. Each time you draw into the pixbuf, instruct the widget to update
itself, with gtk_widget_queue_draw(image).

  I think this should work in theory...


Samir Bonho wrote:

Hi folks ,

I read almost everything about GTKDrawing and GTKPixmap. I compiled an
example (scribble-simple) to understand this functions.For my life in
earth  be peacefull I need to know :

What is the biggest difference of a Drawing area and a Pixmap ???
I draw stuff in the pixmap or in the drawing area ????
For example : I want to draw a point. I set all events that I want. But
this events has to belong to a DrawingArea or to the Pixmap ??

Thanks for your patience...

Samir "the dumbiest man ever" Bonho


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Gustavo João Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>





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