home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / misc / imagefx_sdk / include / scan / procinfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-19  |  2.5 KB  |  66 lines

  1. /*
  2.  * ImageFX Development Header File
  3.  * Copyright © 1991-1995 Nova Design, Inc.
  4.  * Written by Thomas Krehbiel
  5.  *
  6.  * ProcessInfo Definitions.
  7.  *
  8.  */
  9.  
  10. /*
  11.  * ProcessInfo:
  12.  *
  13.  * ImageFX now implements a new method of affecting image buffers,
  14.  * an attempt at standardizing buffer access.  For operations that
  15.  * affect buffers in a top-to-bottom fashion, these routines can be
  16.  * used; they handle a lot of the drudgery of feathering, regions, and
  17.  * channel masks for you.  ImageFX uses these routines internally
  18.  * for almost all operations.
  19.  *
  20.  * The ProcessInfo structure is the information structure passed to
  21.  * and from the "process" functions.
  22.  *
  23.  * Here's basically how it works:
  24.  *
  25.  *    if (procinfo = PrepareProcess("Status Bar", buffer, 1, 1, 0))
  26.  *    {
  27.  *       for (scanline = 0; scanline < pi->Height; scanline++)
  28.  *       {
  29.  *          if (!(success = GetData(procinfo, scanline, 1, 0))) break;
  30.  *          affect_data(procinfo);
  31.  *          if (!(success = PutData(procinfo, j, 1, 0))) break;
  32.  *       }
  33.  *       FinishProcess(procinfo);
  34.  *    }
  35.  *
  36.  * After GetData(), "SR", "SG", and "SB" are filled in with source pixel
  37.  * data.  You must then fill in the "TR", "TG", and "TB" buffers with
  38.  * output pixel data before calling PutData().
  39.  *
  40.  */
  41. struct ProcessInfo
  42. {
  43.    struct Buffer    *Source;        /* Input buffer */
  44.    struct Buffer    *Dest;          /* Output buffer */
  45.    WORD              Left, Top;     /* Upper left corner */
  46.    WORD              Width, Height; /* Size of affected region */
  47.    WORD              StripW, StripH;/* Rows and offset */
  48.    WORD              PadW, PadH;    /* Padding on width and height */
  49.    LONG              Bytes;         /* Bytes per source row */
  50.    UBYTE            *Stencil;       /* Mask of pixels to affect */
  51.    struct Blend     *Blend;         /* Blend plane for region */
  52.    UBYTE            *RR, *RG, *RB;  /* Raw source pixel pointers */
  53.    UBYTE            *BR, *BG, *BB;  /* Beginning source pixel pointers */
  54.    UBYTE            *SR, *SG, *SB;  /* Source pixel data (with offset) */
  55.    UBYTE            *TR, *TG, *TB;  /* Temporary pixel data (output) */
  56.    ULONG             Flags;         /* see below */
  57.    ULONG             pad[4];
  58. };
  59.  
  60. /* flags for ProcessInfo: */
  61. #define PPF_INLINE   0x01           /* Do not need second copy of buffer */
  62. #define PPF_UNDO     0x02           /* Save an undo buffer first */
  63. #define PPF_NOSTATUS 0x04           /* Do not do a status bar */
  64. #define PPF_ABORT    0x80           /* internal use only */
  65.  
  66.