home *** CD-ROM | disk | FTP | other *** search
- /*
- * ImageFX Development Header File
- * Copyright © 1991-1995 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * ProcessInfo Definitions.
- *
- */
-
- /*
- * ProcessInfo:
- *
- * ImageFX now implements a new method of affecting image buffers,
- * an attempt at standardizing buffer access. For operations that
- * affect buffers in a top-to-bottom fashion, these routines can be
- * used; they handle a lot of the drudgery of feathering, regions, and
- * channel masks for you. ImageFX uses these routines internally
- * for almost all operations.
- *
- * The ProcessInfo structure is the information structure passed to
- * and from the "process" functions.
- *
- * Here's basically how it works:
- *
- * if (procinfo = PrepareProcess("Status Bar", buffer, 1, 1, 0))
- * {
- * for (scanline = 0; scanline < pi->Height; scanline++)
- * {
- * if (!(success = GetData(procinfo, scanline, 1, 0))) break;
- * affect_data(procinfo);
- * if (!(success = PutData(procinfo, j, 1, 0))) break;
- * }
- * FinishProcess(procinfo);
- * }
- *
- * After GetData(), "SR", "SG", and "SB" are filled in with source pixel
- * data. You must then fill in the "TR", "TG", and "TB" buffers with
- * output pixel data before calling PutData().
- *
- */
- struct ProcessInfo
- {
- struct Buffer *Source; /* Input buffer */
- struct Buffer *Dest; /* Output buffer */
- WORD Left, Top; /* Upper left corner */
- WORD Width, Height; /* Size of affected region */
- WORD StripW, StripH;/* Rows and offset */
- WORD PadW, PadH; /* Padding on width and height */
- LONG Bytes; /* Bytes per source row */
- UBYTE *Stencil; /* Mask of pixels to affect */
- struct Blend *Blend; /* Blend plane for region */
- UBYTE *RR, *RG, *RB; /* Raw source pixel pointers */
- UBYTE *BR, *BG, *BB; /* Beginning source pixel pointers */
- UBYTE *SR, *SG, *SB; /* Source pixel data (with offset) */
- UBYTE *TR, *TG, *TB; /* Temporary pixel data (output) */
- ULONG Flags; /* see below */
- ULONG pad[4];
- };
-
- /* flags for ProcessInfo: */
- #define PPF_INLINE 0x01 /* Do not need second copy of buffer */
- #define PPF_UNDO 0x02 /* Save an undo buffer first */
- #define PPF_NOSTATUS 0x04 /* Do not do a status bar */
- #define PPF_ABORT 0x80 /* internal use only */
-
-