home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / os-include / graphics / rastport.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  4KB  |  114 lines

  1. #ifndef    GRAPHICS_RASTPORT_H
  2. #define    GRAPHICS_RASTPORT_H
  3. /*
  4. **    $VER: rastport.h 39.0 (21.08.91)
  5. **    Includes Release 39.108
  6. **
  7. **
  8. **
  9. **    (C) Copyright 1985-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifndef GRAPHICS_GFX_H
  18. #include <graphics/gfx.h>
  19. #endif
  20.  
  21. struct AreaInfo
  22. {
  23.     WORD   *VctrTbl;         /* ptr to start of vector table */
  24.     WORD   *VctrPtr;         /* ptr to current vertex */
  25.     BYTE    *FlagTbl;          /* ptr to start of vector flag table */
  26.     BYTE    *FlagPtr;          /* ptrs to areafill flags */
  27.     WORD   Count;         /* number of vertices in list */
  28.     WORD   MaxCount;         /* AreaMove/Draw will not allow Count>MaxCount*/
  29.     WORD   FirstX,FirstY;    /* first point for this polygon */
  30. };
  31.  
  32. struct TmpRas
  33. {
  34.     BYTE *RasPtr;
  35.     LONG Size;
  36. };
  37.  
  38. /* unoptimized for 32bit alignment of pointers */
  39. struct GelsInfo
  40. {
  41.     BYTE sprRsrvd;          /* flag of which sprites to reserve from
  42.                  vsprite system */
  43.     UBYTE Flags;          /* system use */
  44.     struct VSprite *gelHead, *gelTail; /* dummy vSprites for list management*/
  45.     /* pointer to array of 8 WORDS for sprite available lines */
  46.     WORD *nextLine;
  47.     /* pointer to array of 8 pointers for color-last-assigned to vSprites */
  48.     WORD **lastColor;
  49.     struct collTable *collHandler;     /* addresses of collision routines */
  50.     WORD leftmost, rightmost, topmost, bottommost;
  51.    APTR firstBlissObj,lastBlissObj;    /* system use only */
  52. };
  53.  
  54. struct RastPort
  55. {
  56.     struct  Layer *Layer;
  57.     struct  BitMap   *BitMap;
  58.     UWORD  *AreaPtrn;         /* ptr to areafill pattern */
  59.     struct  TmpRas *TmpRas;
  60.     struct  AreaInfo *AreaInfo;
  61.     struct  GelsInfo *GelsInfo;
  62.     UBYTE   Mask;          /* write mask for this raster */
  63.     BYTE    FgPen;          /* foreground pen for this raster */
  64.     BYTE    BgPen;          /* background pen  */
  65.     BYTE    AOlPen;          /* areafill outline pen */
  66.     BYTE    DrawMode;          /* drawing mode for fill, lines, and text */
  67.     BYTE    AreaPtSz;          /* 2^n words for areafill pattern */
  68.     BYTE    linpatcnt;          /* current line drawing pattern preshift */
  69.     BYTE    dummy;
  70.     UWORD  Flags;         /* miscellaneous control bits */
  71.     UWORD  LinePtrn;         /* 16 bits for textured lines */
  72.     WORD   cp_x, cp_y;         /* current pen position */
  73.     UBYTE   minterms[8];
  74.     WORD   PenWidth;
  75.     WORD   PenHeight;
  76.     struct  TextFont *Font;   /* current font address */
  77.     UBYTE   AlgoStyle;          /* the algorithmically generated style */
  78.     UBYTE   TxFlags;          /* text specific flags */
  79.     UWORD   TxHeight;          /* text height */
  80.     UWORD   TxWidth;          /* text nominal width */
  81.     UWORD   TxBaseline;       /* text baseline */
  82.     WORD    TxSpacing;          /* text spacing (per character) */
  83.     APTR    *RP_User;
  84.     ULONG   longreserved[2];
  85. #ifndef GFX_RASTPORT_1_2
  86.     UWORD   wordreserved[7];  /* used to be a node */
  87.     UBYTE   reserved[8];      /* for future use */
  88. #endif
  89. };
  90.  
  91. /* drawing modes */
  92. #define JAM1        0          /* jam 1 color into raster */
  93. #define JAM2        1          /* jam 2 colors into raster */
  94. #define COMPLEMENT  2          /* XOR bits into raster */
  95. #define INVERSVID   4          /* inverse video for drawing modes */
  96.  
  97. /* these are the flag bits for RastPort flags */
  98. #define FRST_DOT    0x01      /* draw the first dot of this line ? */
  99. #define ONE_DOT     0x02      /* use one dot mode for drawing lines */
  100. #define DBUFFER     0x04      /* flag set when RastPorts
  101.                  are double-buffered */
  102.  
  103.          /* only used for bobs */
  104.  
  105. #define AREAOUTLINE 0x08      /* used by areafiller */
  106. #define NOCROSSFILL 0x20      /* areafills have no crossovers */
  107.  
  108. /* there is only one style of clipping: raster clipping */
  109. /* this preserves the continuity of jaggies regardless of clip window */
  110. /* When drawing into a RastPort, if the ptr to ClipRect is nil then there */
  111. /* is no clipping done, this is dangerous but useful for speed */
  112.  
  113. #endif    /* GRAPHICS_RASTPORT_H */
  114.