home *** CD-ROM | disk | FTP | other *** search
- #ifndef ALPHACHANNEL_H_
- #define ALPHACHANNEL_H_
-
- #ifndef __QDOFFSCREEN__
- #include <QDOffscreen.h>
- #endif
-
-
- typedef struct {
- unsigned char alpha;
- unsigned char red;
- unsigned char green;
- unsigned char blue;
- } ThirtyTwoBitPixel, *ThirtyTwoBitPixelPtr;
-
- typedef void (*AlphaPixelFilterProc)(ThirtyTwoBitPixelPtr pixel);
-
- // ---------------------------------------------------------------------------
-
- Boolean HasPossibleAlphaChannel(GWorldPtr buffer);
-
- /*
- SplitAlphaChannel() works on the entire gworld, and directly accesses
- the pixel map data therein.
-
- <srcBuffer> must be a 32-bit offscreen gworld
- <imageBuffer> may be:
- - 32-bit offscreen gworld, or
- - same gworld as <srcBuffer>, or
- - NULL
- <alphaBuffer> may be:
- - 8-bit offscreen gworld, or
- - NULL
- <pixelProc> may be:
- - address of your pixel filtering proc, or
- - NULL
- */
- void SplitAlphaChannel(
- GWorldPtr srcBuffer,
- GWorldPtr imageBuffer,
- GWorldPtr alphaBuffer,
- AlphaPixelFilterProc pixelProc);
-
- #endif // ALPHACHANNEL_H_