home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / onlineco / files / ImageMagick-6.0.1-Q16-windows-dll.exe / {app} / include / magick / draw.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-04-07  |  4.8 KB  |  351 lines

  1. /*
  2.   Drawing methods.
  3. */
  4. #ifndef _MAGICK_DRAW_H
  5. #define _MAGICK_DRAW_H
  6.  
  7. #if defined(__cplusplus) || defined(c_plusplus)
  8. extern "C" {
  9. #endif
  10.  
  11. #include "magick/type.h"
  12.  
  13. typedef enum
  14. {
  15.   UndefinedAlign,
  16.   LeftAlign,
  17.   CenterAlign,
  18.   RightAlign
  19. } AlignType;
  20.  
  21. typedef enum
  22. {
  23.   UndefinedPathUnits,
  24.   UserSpace,
  25.   UserSpaceOnUse,
  26.   ObjectBoundingBox
  27. } ClipPathUnits;
  28.  
  29. typedef enum
  30. {
  31.   UndefinedDecoration,
  32.   NoDecoration,
  33.   UnderlineDecoration,
  34.   OverlineDecoration,
  35.   LineThroughDecoration
  36. } DecorationType;
  37.  
  38. typedef enum
  39. {
  40.   UndefinedRule,
  41. #undef EvenOddRule
  42.   EvenOddRule,
  43.   NonZeroRule
  44. } FillRule;
  45.  
  46. typedef enum
  47. {
  48.   UndefinedGradient,
  49.   LinearGradient,
  50.   RadialGradient
  51. } GradientType;
  52.  
  53. typedef enum
  54. {
  55.   UndefinedCap,
  56.   ButtCap,
  57.   RoundCap,
  58.   SquareCap
  59. } LineCap;
  60.  
  61. typedef enum
  62. {
  63.   UndefinedJoin,
  64.   MiterJoin,
  65.   RoundJoin,
  66.   BevelJoin
  67. } LineJoin;
  68.  
  69. typedef enum
  70. {
  71.   UndefinedMethod,
  72.   PointMethod,
  73.   ReplaceMethod,
  74.   FloodfillMethod,
  75.   FillToBorderMethod,
  76.   ResetMethod
  77. } PaintMethod;
  78.  
  79. typedef enum
  80. {
  81.   UndefinedPrimitive,
  82.   PointPrimitive,
  83.   LinePrimitive,
  84.   RectanglePrimitive,
  85.   RoundRectanglePrimitive,
  86.   ArcPrimitive,
  87.   EllipsePrimitive,
  88.   CirclePrimitive,
  89.   PolylinePrimitive,
  90.   PolygonPrimitive,
  91.   BezierPrimitive,
  92.   ColorPrimitive,
  93.   MattePrimitive,
  94.   TextPrimitive,
  95.   ImagePrimitive,
  96.   PathPrimitive
  97. } PrimitiveType;
  98.  
  99. typedef enum
  100. {
  101.   UndefinedReference,
  102.   GradientReference
  103. } ReferenceType;
  104.  
  105. typedef enum
  106. {
  107.   UndefinedSpread,
  108.   PadSpread,
  109.   ReflectSpead,
  110.   RepeatSpread
  111. } SpreadMethod;
  112.  
  113. typedef struct _GradientInfo
  114. {
  115.   GradientType
  116.     type;
  117.  
  118.   PixelPacket
  119.     color;
  120.  
  121.   SegmentInfo
  122.     stop;
  123.  
  124.   unsigned long
  125.     length;
  126.  
  127.   SpreadMethod
  128.     spread;
  129.  
  130.   unsigned int
  131.     debug;
  132.  
  133.   unsigned long
  134.     signature;
  135.  
  136.   struct _GradientInfo
  137.     *previous,
  138.     *next;
  139. } GradientInfo;
  140.  
  141. typedef struct _ElementReference
  142. {
  143.   char
  144.     *id;
  145.  
  146.   ReferenceType
  147.     type;
  148.  
  149.   GradientInfo
  150.     gradient;
  151.  
  152.   unsigned long
  153.     signature;
  154.  
  155.   struct _ElementReference
  156.     *previous,
  157.     *next;
  158. } ElementReference;
  159.  
  160. typedef struct _DrawInfo
  161. {
  162.   char
  163.     *primitive,
  164.     *geometry;
  165.  
  166.   AffineMatrix
  167.     affine;
  168.  
  169.   GravityType
  170.     gravity;
  171.  
  172.   PixelPacket
  173.     fill,
  174.     stroke;
  175.  
  176.   double
  177.     stroke_width;
  178.  
  179.   GradientInfo
  180.     gradient;
  181.  
  182.   Image
  183.     *fill_pattern,
  184.     *tile,
  185.     *stroke_pattern;
  186.  
  187.   unsigned int
  188.     stroke_antialias,
  189.     text_antialias;
  190.  
  191.   FillRule
  192.     fill_rule;
  193.  
  194.   LineCap
  195.     linecap;
  196.  
  197.   LineJoin
  198.     linejoin;
  199.  
  200.   unsigned long
  201.     miterlimit;
  202.  
  203.   double
  204.     dash_offset;
  205.  
  206.   DecorationType
  207.     decorate;
  208.  
  209.   CompositeOperator
  210.     compose;
  211.  
  212.   char
  213.     *text;
  214.  
  215.   unsigned long
  216.     face;
  217.  
  218.   char
  219.     *font,
  220.     *metrics,
  221.     *family;
  222.  
  223.   StyleType
  224.     style;
  225.  
  226.   StretchType
  227.     stretch;
  228.  
  229.   unsigned long
  230.     weight;
  231.  
  232.   char
  233.     *encoding;
  234.  
  235.   double
  236.     pointsize;
  237.  
  238.   char
  239.     *density;
  240.  
  241.   AlignType
  242.     align;
  243.  
  244.   PixelPacket
  245.     undercolor,
  246.     border_color;
  247.  
  248.   char
  249.     *server_name;
  250.  
  251.   double
  252.     *dash_pattern;
  253.  
  254.   char
  255.     *clip_path;
  256.  
  257.   SegmentInfo
  258.     bounds;
  259.  
  260.   ClipPathUnits
  261.     clip_units;
  262.  
  263.   Quantum
  264.     opacity;
  265.  
  266.   unsigned int
  267.     render;
  268.  
  269.   ElementReference
  270.     element_reference;
  271.  
  272.   unsigned int
  273.     debug;
  274.  
  275.   unsigned long
  276.     signature;
  277. } DrawInfo;
  278.  
  279. typedef struct _PointInfo
  280. {
  281.   double
  282.     x,
  283.     y;
  284. } PointInfo;
  285.  
  286. typedef struct _PrimitiveInfo
  287. {
  288.   PointInfo
  289.     point;
  290.  
  291.   unsigned long
  292.     coordinates;
  293.  
  294.   PrimitiveType
  295.     primitive;
  296.  
  297.   PaintMethod
  298.     method;
  299.  
  300.   char
  301.     *text;
  302. } PrimitiveInfo;
  303.  
  304. typedef struct _TypeMetric
  305. {
  306.   PointInfo
  307.     pixels_per_em;
  308.  
  309.   double
  310.     ascent,
  311.     descent,
  312.     width,
  313.     height,
  314.     max_advance,
  315.     underline_position,
  316.     underline_thickness;
  317.  
  318.   SegmentInfo
  319.     bounds;
  320. } TypeMetric;
  321.  
  322. extern MagickExport char
  323.   **GetTypeList(const char *,unsigned long *);
  324.  
  325. extern MagickExport const TypeInfo
  326.   *GetTypeInfo(const char *,ExceptionInfo *),
  327.   *GetTypeInfoByFamily(const char *,const StyleType,const StretchType,
  328.     const unsigned long,ExceptionInfo *);
  329.  
  330. extern MagickExport DrawInfo
  331.   *CloneDrawInfo(const ImageInfo *,const DrawInfo *);
  332.  
  333. extern MagickExport unsigned int
  334.   DrawAffineImage(Image *,const Image *,const AffineMatrix *),
  335.   DrawClipPath(Image *,const DrawInfo *,const char *),
  336.   DrawImage(Image *,const DrawInfo *),
  337.   DrawPatternPath(Image *,const DrawInfo *,const char *,Image **),
  338.   DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *),
  339.   ListTypeInfo(FILE *,ExceptionInfo *);
  340.  
  341. extern MagickExport void
  342.   GetAffineMatrix(AffineMatrix *),
  343.   DestroyDrawInfo(DrawInfo *),
  344.   GetDrawInfo(const ImageInfo *,DrawInfo *);
  345.  
  346. #if defined(__cplusplus) || defined(c_plusplus)
  347. }
  348. #endif
  349.  
  350. #endif
  351.