Re: gtkdrawing x gtkpixmap



Hi,

I am not sure if this will help because I am just starting out in GTK myself, but a gtk_timeout might be what you are looking for regarding the lack of dependency on signal callbacks.

Regarding drawing points on a drawing area, the approach I am using for my app at the moment, is creating a GdkPixbuf, editing the data pixel-by-pixel, and then rendering it to the drawing area on an expose event or when changes are made using gdk_pixbuf_render_to_drawable().

I am afraid I have not used the gdk_draw... set of functions myself, but they might also be what you are looking for. They allow you to draw 'primitives' such as rectangles, lines, etc onto a drawable such as a drawing area.

Find out about timeouts here:
http://www.gtk.org/tutorial/ch-timeouts.html

Find out about the drawing functions here:
http://www.gtk.org/tutorial/sec-scribble.html#AEN2945 (uses gdk_draw_rectangle) http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html (lists all the drawing primitives etc)

I hope this is of some help.

Chris.


From: Brandon <bmccombs ma rr com>
To: Samir Bonho <samir labspot ufsc br>
CC: gtk <gtk-app-devel-list gnome org>
Subject: Re: gtkdrawing x gtkpixmap
Date: Tue, 11 Mar 2003 20:30:13 -0500

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.

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


_________________________________________________________________
Express yourself with cool emoticons http://messenger.msn.co.uk




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