nanogui: How pixmaps will work
Subject:
How pixmaps will work
From:
Greg Haerr ####@####.####
Date:
15 Oct 1999 16:43:10 -0000
Message-Id: <01BF16F9.AD1BEEE0.greg@censoft.com>
: *cheer*
: I worked a bit on this last night when I discovered the lack of any way
: to double-buffer.
: Will you set up a state where you can specify that a window have a
: written and a viewed page ?
Not quite. The general idea will be to have a "CreatePixmap" routine
that will basically allocate memory, and then the returned id can be used for
any of the drawing functions. All drawing will be offscreen. Then, when
the contents want to be displayed, a "BitBlit" routine will copy some x,y,w,h
portion of the offscreen bitmap to a specified window on the screen.
The destination window's clipping parameters will generally be used, although
the first implementation might not support clipping.
: Or should we create our own backbuffer by making two windows and show
: the one that's not written to by GrLowerWindowing it.
No - the difference between a window and an offscreen bitmap is
fairly simple. An offscreen bitmap has a w,h and bits associated with it.
OTOH, a window has an x, y, w, h and no bits associated with it. Thus,
a window must be _redrawn_ from expose events whenever it needs to be
drawn, whereas a offscreen bitmap will never get expose events and must
always be copied (BitBlit'd) to a window.
OK?
: