nanogui: Bitblt proposal (was: Re: bogl routines)
Subject:
RE: Bitblt proposal (was: Re: bogl routines)
From:
Greg Haerr ####@####.####
Date:
18 May 1999 02:23:49 -0000
Message-Id: <01BEA0A2.8DF7B580.greg@censoft.com>
> Okay, this still leaves masking. We could add a mask parameter, I
> suppose:
>
> /* Copy a block of pixels from (SX,SY)-(SX+W,SY+H) in SRC to
> (DX,DY)+(DX+W,DY+H) in DEST, applying raster operation ROP. DST
> and SRC may be bitmaps created with bogl_create_bitmap(), or they
> may be null pointers, representing the screen image. If MASK is
> non-null, then it must be a 1-bit-depth mask of size (W,H)
> specifying which pixels in SRC should be copied. Each row in MASK
> must be padded on the right to a 32-bit multiple in size. */
> void bogl_bitblt (struct bogl_bitmap *dst, int dx, int dy,
> struct bogl_bitmap *src, int sx, int sy,
> int w, int h, int rop, void *mask);
>
> Already I'm saying ``Ugh'' to myself when I think about actually
> implementing this. Do we need even more than that?
>
If it makes you feel any better, the Win32 bitblt function takes *nine* parameters:
BitBlt(hdcDest, xDest, yDest, wDest, hDest, hdcSrc, xSrc, ySrc, dwOpcode);
the hdc parms are handles to device context's, which are either the screen or a
selected off-screen (memory) bitmap.
You're actually on the right track...
Greg