home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 1 / Amiga Tools.iso / egs-tools / egs_dev-disk / egsincludes / egsblit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-06  |  3.8 KB  |  163 lines

  1. #ifndef EGS_EGSBLIT_H
  2. #define EGS_EGSBLIT_H
  3.  
  4. /***************************************************************************\
  5. *
  6. *  $
  7. *  $ FILE     : egsblit.h
  8. *  $ VERSION  : 1
  9. *  $ REVISION : 4
  10. *  $ DATE     : 08-Dec-93 12:45
  11. *  $
  12. *  $ Author   : mvk
  13. *  $
  14. *
  15. *****************************************************************************
  16. *                                                                           *
  17. * (c) Copyright 1990/94 VIONA Development                                   *
  18. *     All Rights Reserved                                                   *
  19. *                                                                           *
  20. \***************************************************************************/
  21.  
  22. #ifndef         EXEC_TYPES_H
  23. #include        <exec/types.h>
  24. #endif
  25. #ifndef         EXEC_PORTS_H
  26. #include        <exec/ports.h>
  27. #endif
  28. #ifndef         EGS_EGS_H
  29. #include        <egs/egs.h>
  30. #endif
  31.  
  32.  
  33. /*
  34.  * This library offers basic drawing functions. These are especially func-
  35.  * tions that might later be implemented by a blitter in some future
  36.  * version of a graphic boards.
  37.  *
  38.  * Therefore these functions should be used whenever possible.
  39.  *
  40.  * Moreover, the library forms the base for other libraries such as EGSLayers,
  41.  * EGSGfx and EGSIntui. If the library is implemented for any other graphic
  42.  * boards, the other libraries will run without change.
  43.  *
  44.  * Programs that abide by this convention face a safe future.
  45.  *
  46.  * In favour of speed, the library neglects heavier management. Most func-
  47.  * tions are contained in one version with and one version without clipping.
  48.  * That clipping is rather rudimentary since it supports only one rectangle.
  49.  *
  50.  */
  51.  
  52.  
  53.  
  54. /*
  55.  * ClipRect, ClipRectPtr
  56.  *
  57.  * Definition of a clipping rectangle. The values are inclusive, i.e. they
  58.  * are located inside the rectangle.
  59.  * The "Next" field is ignored by EGSBlit but used by EGSLayers.
  60.  *
  61.  */
  62.  
  63. typedef struct EB_ClipRect *EB_ClipRectPtr;
  64.  
  65. struct EB_ClipRect {
  66.  
  67.         EB_ClipRectPtr Next;
  68.         WORD           Left, Top, Right, Bottom;
  69. };
  70.  
  71.  
  72.  
  73. /*
  74.  * ColorTable, Image
  75.  *
  76.  * Many times you use predefined images for icons. As video organization is
  77.  * different in different video modes, images are stored in a general, bit-
  78.  * plane oriented way and can be inflated on need to different bit depths.
  79.  *
  80.  * To achieve this an array must be specified containing the color values
  81.  * that are wanted for the image.
  82.  */
  83.  
  84. /*
  85.  * Note:
  86.  * Differing from the Cluster .def file, ColorTable is defined as the
  87.  * type contained in the color table instead of the array itself. Thus
  88.  * ColorTablePtr is declared differently, either.
  89.  *
  90.  */
  91.  
  92. typedef ULONG EB_ColorTable;
  93. typedef EB_ColorTable *EB_ColorTablePtr;
  94.  
  95. typedef struct EB_Image *EB_ImagePtr;
  96.  
  97. struct EB_Image {
  98.  
  99.         WORD  Width, Height, Depth;
  100.         WORD  Pad_1;
  101.         APTR  Planes [8];
  102. };
  103.  
  104.  
  105.  
  106. /*
  107.  * ColorDes, ColorDesPtr
  108.  *
  109.  * Descriptor for text output.
  110.  *
  111.  * ColorDes
  112.  *  .Front       : Front pen color.
  113.  *  .Back        : Back pen color if transparent = FALSE.
  114.  *  .Transparent : if TRUE the background shines through
  115.  *                 (thru for US guys) "holes".
  116.  */
  117.  
  118. typedef struct EB_ColorDes *EB_ColorDesPtr;
  119.  
  120. struct EB_ColorDes {
  121.  
  122.         ULONG Front, Back;
  123.         UBYTE Transparent;
  124.         UBYTE Pad_1, Pad_2, Pad_3;
  125. };
  126.  
  127.  
  128. /*
  129.  * ImageDesPtr, ImageDes
  130.  *
  131.  * Object description for "FillMask".
  132.  *
  133.  * ImageDes
  134.  *   .Colors   : Filling colors.
  135.  *   .Left,
  136.  *   .Top,
  137.  *   .Width,
  138.  *   .Height   : Borders of the object.
  139.  */
  140.  
  141. typedef struct EB_ImageDes *EB_ImageDesPtr;
  142.  
  143. struct EB_ImageDes {
  144.  
  145.         struct EB_ColorDes Colors;
  146.         WORD   Left, Top, Width, Height;
  147. };
  148.  
  149. /*
  150.  * Polygon, PolygonPtr
  151.  *
  152.  * Description of a polygon for PolygonFill. The array size is not limited.
  153.  */
  154.  
  155. struct EB_Polygon {
  156.                     WORD X, Y;
  157. };
  158.  
  159. typedef struct EB_Polygon *EB_PolygonPtr;
  160.  
  161. #endif /* EGS_EGSBLIT_H */
  162.  
  163.