home *** CD-ROM | disk | FTP | other *** search
- /*
- * ImageFX Development Header File
- * Copyright © 1991-1995 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Dither Module Defintions
- *
- */
-
- /*
- * DitherArgs:
- *
- * Passed back and forth among the dithering functions.
- *
- */
- struct DitherArgs
- {
- short X1, Y1; /* Starting corner */
- short Width, Height; /* Area to work on */
- short (*CB_NewLine) /* Called to start each line */
- (short wid,
- short row);
- short (*CB_Quantize) /* Find closest palette entry */
- (short r, short g, short b,
- short *qr, short *qg, short *qb);
- void (*CB_PutLine) /* Output a line of RGB data */
- (UWORD *outline,
- short xoffs,
- short wid,
- short row);
- LONG Type; /* Type of dither (index) */
- LONG Direction; /* Direction of dither (index) */
- LONG Limit; /* Error limit (index) */
- short Bits; /* Output color depth */
- };
-
- /* void CB_NewLine (short width, short row) */
- /* color = CB_Quantize (short r, g, b, short &qr, &qg, &qb) */
- /* void CB_PutLine (UWORD *outline, short xoffs, short wid, short row) */
-
- #define DF_FWD (0x0000)
- #define DF_BACK (0x8000)
- #define DF_ZIGZAG (0x4000)
-
-
- #ifndef NO_DITHER_DEFINES
- #define DM_NewDither DoDither
- #define DM_InitDither InitDither
- #define DM_FreeDither FreeDither
- #endif
-