Re: handling pixmaps




raster@redhat.com writes:

> On 15 Apr, Tony Gale shouted:
> ->  
> ->  Would some kind sole explain the mysteries of pixmaps to me. I
> ->  basically want to plot position's onto a map. So, I have a contour
> ->  map in xpm format, and have created a drawing area to plot it on and
> ->  a backing pixmap to save on flicker.
> ->  
> ->  So, the process (I think) would be to copy the map pixmap onto the
> ->  backing pixmap, and then plot the positions (as circles or whatever)
> ->  over the top - and then copy this backing pixmap to the drawing area
> ->  (and handle expose event's).

[ "use a backing pixmap" ]

> the functions you want to look at are:
> 
> gdk_window_clear
> gdk_window_clear_area
> gdk_window_set_back_pixmap
> gtk_drawing_area_new

Since the goal was to draw one pixmap onto another, another
call will also in handy, even if using a backing pixmap,

void gdk_draw_pixmap	 (GdkDrawable  *drawable,
			  GdkGC	       *gc,
			  GdkDrawable  *src,
			  gint		xsrc,
			  gint		ysrc,
			  gint		xdest,
			  gint		ydest,
			  gint		width,
			  gint		height);

Regards,
                                        Owen



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