Hi! El Fri, Mar 24, 2006 at 11:56:05AM +0000, Josepo Urrutia escribio: > I'm trying to draw a dinamicaly generated drawing into a Gtk::DrawingArea > as fast as is possible. > > The drawing stuff is done into a Gdk::Pixmap (a lot of draw_segments) that > depents on external information ( a socket, a file... whathever ). > On the other hand I've a timer that looks if there is a new image to load > (a new pixmap generated), if the pixmap is generated a queue_draw call is > done. > Last in the on_expose_event we simply do a draw_drawable of the pixmap to > the window.
You should use a Gdk::Pixbuf if you need speed. Then, you can access the raw image data and then copy that to the X server. If you need more speed, you should generate and copy the image in small chunks (for example, as groups of scan-lines), this will improve the cache eficiency a lot. Daniel. _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
