00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _MAGICKCORE_DRAW_H
00019 #define _MAGICKCORE_DRAW_H
00020
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024
00025 #include "magick/geometry.h"
00026 #include "magick/image.h"
00027 #include "magick/pixel.h"
00028 #include "magick/type.h"
00029
00030 typedef enum
00031 {
00032 UndefinedAlign,
00033 LeftAlign,
00034 CenterAlign,
00035 RightAlign
00036 } AlignType;
00037
00038 typedef enum
00039 {
00040 UndefinedPathUnits,
00041 UserSpace,
00042 UserSpaceOnUse,
00043 ObjectBoundingBox
00044 } ClipPathUnits;
00045
00046 typedef enum
00047 {
00048 UndefinedDecoration,
00049 NoDecoration,
00050 UnderlineDecoration,
00051 OverlineDecoration,
00052 LineThroughDecoration
00053 } DecorationType;
00054
00055 typedef enum
00056 {
00057 UndefinedRule,
00058 #undef EvenOddRule
00059 EvenOddRule,
00060 NonZeroRule
00061 } FillRule;
00062
00063 typedef enum
00064 {
00065 UndefinedGradient,
00066 LinearGradient,
00067 RadialGradient
00068 } GradientType;
00069
00070 typedef enum
00071 {
00072 UndefinedCap,
00073 ButtCap,
00074 RoundCap,
00075 SquareCap
00076 } LineCap;
00077
00078 typedef enum
00079 {
00080 UndefinedJoin,
00081 MiterJoin,
00082 RoundJoin,
00083 BevelJoin
00084 } LineJoin;
00085
00086 typedef enum
00087 {
00088 UndefinedMethod,
00089 PointMethod,
00090 ReplaceMethod,
00091 FloodfillMethod,
00092 FillToBorderMethod,
00093 ResetMethod
00094 } PaintMethod;
00095
00096 typedef enum
00097 {
00098 UndefinedPrimitive,
00099 PointPrimitive,
00100 LinePrimitive,
00101 RectanglePrimitive,
00102 RoundRectanglePrimitive,
00103 ArcPrimitive,
00104 EllipsePrimitive,
00105 CirclePrimitive,
00106 PolylinePrimitive,
00107 PolygonPrimitive,
00108 BezierPrimitive,
00109 ColorPrimitive,
00110 MattePrimitive,
00111 TextPrimitive,
00112 ImagePrimitive,
00113 PathPrimitive
00114 } PrimitiveType;
00115
00116 typedef enum
00117 {
00118 UndefinedReference,
00119 GradientReference
00120 } ReferenceType;
00121
00122 typedef enum
00123 {
00124 UndefinedSpread,
00125 PadSpread,
00126 ReflectSpread,
00127 RepeatSpread
00128 } SpreadMethod;
00129
00130 typedef struct _PointInfo
00131 {
00132 double
00133 x,
00134 y;
00135 } PointInfo;
00136
00137 typedef struct _StopInfo
00138 {
00139 MagickPixelPacket
00140 color;
00141
00142 MagickRealType
00143 offset;
00144 } StopInfo;
00145
00146 typedef struct _GradientInfo
00147 {
00148 GradientType
00149 type;
00150
00151 RectangleInfo
00152 bounding_box;
00153
00154 SegmentInfo
00155 gradient_vector;
00156
00157 StopInfo
00158 *stops;
00159
00160 unsigned long
00161 number_stops;
00162
00163 SpreadMethod
00164 spread;
00165
00166 MagickBooleanType
00167 debug;
00168
00169 unsigned long
00170 signature;
00171
00172 PointInfo
00173 center;
00174
00175 MagickRealType
00176 radius;
00177 } GradientInfo;
00178
00179 typedef struct _ElementReference
00180 {
00181 char
00182 *id;
00183
00184 ReferenceType
00185 type;
00186
00187 GradientInfo
00188 gradient;
00189
00190 unsigned long
00191 signature;
00192
00193 struct _ElementReference
00194 *previous,
00195 *next;
00196 } ElementReference;
00197
00198 typedef struct _DrawInfo
00199 {
00200 char
00201 *primitive,
00202 *geometry;
00203
00204 RectangleInfo
00205 viewbox;
00206
00207 AffineMatrix
00208 affine;
00209
00210 GravityType
00211 gravity;
00212
00213 PixelPacket
00214 fill,
00215 stroke;
00216
00217 double
00218 stroke_width;
00219
00220 GradientInfo
00221 gradient;
00222
00223 Image
00224 *fill_pattern,
00225 *tile,
00226 *stroke_pattern;
00227
00228 MagickBooleanType
00229 stroke_antialias,
00230 text_antialias;
00231
00232 FillRule
00233 fill_rule;
00234
00235 LineCap
00236 linecap;
00237
00238 LineJoin
00239 linejoin;
00240
00241 unsigned long
00242 miterlimit;
00243
00244 double
00245 dash_offset;
00246
00247 DecorationType
00248 decorate;
00249
00250 CompositeOperator
00251 compose;
00252
00253 char
00254 *text;
00255
00256 unsigned long
00257 face;
00258
00259 char
00260 *font,
00261 *metrics,
00262 *family;
00263
00264 StyleType
00265 style;
00266
00267 StretchType
00268 stretch;
00269
00270 unsigned long
00271 weight;
00272
00273 char
00274 *encoding;
00275
00276 double
00277 pointsize;
00278
00279 char
00280 *density;
00281
00282 AlignType
00283 align;
00284
00285 PixelPacket
00286 undercolor,
00287 border_color;
00288
00289 char
00290 *server_name;
00291
00292 double
00293 *dash_pattern;
00294
00295 char
00296 *clip_mask;
00297
00298 SegmentInfo
00299 bounds;
00300
00301 ClipPathUnits
00302 clip_units;
00303
00304 Quantum
00305 opacity;
00306
00307 MagickBooleanType
00308 render;
00309
00310 ElementReference
00311 element_reference;
00312
00313 MagickBooleanType
00314 debug;
00315
00316 unsigned long
00317 signature;
00318
00319 double
00320 kerning,
00321 interword_spacing,
00322 interline_spacing;
00323 } DrawInfo;
00324
00325 typedef struct _PrimitiveInfo
00326 {
00327 PointInfo
00328 point;
00329
00330 unsigned long
00331 coordinates;
00332
00333 PrimitiveType
00334 primitive;
00335
00336 PaintMethod
00337 method;
00338
00339 char
00340 *text;
00341 } PrimitiveInfo;
00342
00343 typedef struct _TypeMetric
00344 {
00345 PointInfo
00346 pixels_per_em;
00347
00348 double
00349 ascent,
00350 descent,
00351 width,
00352 height,
00353 max_advance,
00354 underline_position,
00355 underline_thickness;
00356
00357 SegmentInfo
00358 bounds;
00359
00360 PointInfo
00361 origin;
00362 } TypeMetric;
00363
00364 extern MagickExport DrawInfo
00365 *AcquireDrawInfo(void),
00366 *CloneDrawInfo(const ImageInfo *,const DrawInfo *),
00367 *DestroyDrawInfo(DrawInfo *);
00368
00369 extern MagickExport MagickBooleanType
00370 DrawAffineImage(Image *,const Image *,const AffineMatrix *),
00371 DrawClipPath(Image *,const DrawInfo *,const char *),
00372 DrawGradientImage(Image *,const DrawInfo *),
00373 DrawImage(Image *,const DrawInfo *),
00374 DrawPatternPath(Image *,const DrawInfo *,const char *,Image **),
00375 DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *);
00376
00377 extern MagickExport void
00378 GetAffineMatrix(AffineMatrix *),
00379 GetDrawInfo(const ImageInfo *,DrawInfo *);
00380
00381 #if defined(__cplusplus) || defined(c_plusplus)
00382 }
00383 #endif
00384
00385 #endif