double buffering question




hi,

i have a question somewhat related to double buffering (i
think). basically,i have a GdkPixmap (say 'A') i'm loading from a
file. i have another GdkPixmap (say 'B') that's the backing pixmap for
a widget, and is basically 'A' + a rectangle 

now, each click on the area will change the location of the
rectangle. hence, i'll redraw the pixmap (assume i can't find the old
location of the rectangle, otherwise i'd have just repainted it in
bg), and the rectangle in the new place.

*now* the gtk question <grin>.

is there any way of copying/cloning/duplicating a pixmap from another
one? basically each time i do a redraw, i want to copy 'A' to 'B',
then draw the rect, and then redisplay.

since the actual data is in a file, i don't wanna do a create_from_xpm
each time i redraw! (which i'll have to do if i can't copy from 'A' to
'B': loading 'B' from the file each time)

i guess i can do a memcpy, but i don't know the size of pixmap (i know
gdk_window_get_geometry is not supported; even that might not give all
the info to divine the size of the structure).

what do you guys think?
amit


-- 
         To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

	Mailing list concerns should be mailed to <listmaster@redhat.com>



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