nanogui: bogl routines
Subject:
Re: bogl routines
From:
Ben Pfaff ####@####.####
Date:
13 May 1999 16:46:08 -0000
Message-Id: <87btfohqg4.fsf@pfaffben.user.msu.edu>
Greg Haerr ####@####.#### writes:
In order to keep nanogui simple, I'm thinking about having the mouse
pointer drawing/undrawing routine be the same driver routine as the low-level bit
blt (except that the pointer is a monochrome bitmap, and there's also a mask, which
means that the bitblt needs to do a mask AND and then image OR).
In addition, I need to add a pixel read routine, which would be shared for the
pointer save.
What do you think?
That sounds fine to me, except that I think a pixel read routine would
be too slow for use with a mouse pointer. I think that you really
want a screen->buffer bitblt.
How about signatures something like this:
/* Screen->buffer bitblt. If BUF is a null pointer, returns
the size of buffer necessary to save the given region;
otherwise, copies region (X1,Y1)-(X2,Y2), excluding row
Y2 and column Y2, into BUF, in a format suitable for use
with bogl_brestore(). */
size_t bogl_bsave (int x1, int y1, int x2, int y2, void *buf);
/* Buffer->screen bitblt. */
/* Should the region size be passed in as (X2,Y2) or stored
in BUF by bogl_bsave? */
void bogl_brestore (int x1, int y1, void *buf);
/* Screen->screen bitblt. */
/* Would you prefer a
(X1,Y1)-(X2,Y2) => (X3,Y3)-(X3+X2-X1,Y3+Y2-X2) style? */
void bogl_bmove (int sx, int sy, int dx, int dy, int w, int h);
How do you propose to handle masking?