efficient drawing of complex data



Hello again.

Problem: I have a GtkDrawingArea, the contents consists of rectangular
areas which are painted pixel by pixel (cause i have to calculate the
correct color for every single pixel). What is the fastet way to paint
this?  Right now my solution is:

1. a rgb buffer for the rectangular areas, filling it pixel by pixel.
2. draw these areas in a GdkPixmap using gdk_draw_rgb_image(pixmap, ...)
3. finally showing this pixmap on screen using
   gdk_draw_pixmap(drawingarea->window)

Is it faster to paint every pixel directly in the GdkPixmap? What
about the color allocation for every pixel?

Is it faster to draw the areas directly on screen skipping the
GdkPixmap (there might be thousands of rectangular areas).

Markus.



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