GdkPixmap and Buffers
- From: Geoff Finger <gfinger cravegames com>
- To: gtk-list redhat com
- Subject: GdkPixmap and Buffers
- Date: Thu, 6 May 1999 15:31:56 -0700 (PDT)
Part of the program I'm working involves being able to drag images around
on the screen. Because the background remians the same most of the time, I
decided to try creatting a second buffer (or third, depending on your
terminology =)
My idea was to create two GdkPixmaps,
static GdkPixmap *pixmap=NULL; and
static GdkPixmap *pixmap2=NULL;
and allocate the second one in the same manner as the first, and once i'd
finished drawing the background run
memcpy(pixmap2,pixmap,sizeof(pixmap);
then everytime in the motion_notify_event function i call
memcpy(pixmap,pixmap2,sizeof(pixmap));
and then call DrawImage and do any other drawing i want.
However when i compile and run this, when i move the image the background
does not get redrawn behind it.
Is there something weird about the structure of GdkPixmap such that memcpy
can't be used on it, or is there some other problem?
thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]