File indexing completed on 2025-09-18 09:18:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef MAGICKCORE_DRAW_H
0019 #define MAGICKCORE_DRAW_H
0020
0021 #include "MagickCore/geometry.h"
0022 #include "MagickCore/image.h"
0023 #include "MagickCore/pixel.h"
0024 #include "MagickCore/type.h"
0025 #include "MagickCore/color.h"
0026
0027 #if defined(__cplusplus) || defined(c_plusplus)
0028 extern "C" {
0029 #endif
0030
0031 typedef enum
0032 {
0033 UndefinedAlign,
0034 LeftAlign,
0035 CenterAlign,
0036 RightAlign
0037 } AlignType;
0038
0039 typedef enum
0040 {
0041 UndefinedPathUnits,
0042 UserSpace,
0043 UserSpaceOnUse,
0044 ObjectBoundingBox
0045 } ClipPathUnits;
0046
0047 typedef enum
0048 {
0049 UndefinedDecoration,
0050 NoDecoration,
0051 UnderlineDecoration,
0052 OverlineDecoration,
0053 LineThroughDecoration
0054 } DecorationType;
0055
0056 typedef enum
0057 {
0058 UndefinedDirection,
0059 RightToLeftDirection,
0060 LeftToRightDirection,
0061 TopToBottomDirection
0062 } DirectionType;
0063
0064 typedef enum
0065 {
0066 UndefinedRule,
0067 #undef EvenOddRule
0068 EvenOddRule,
0069 NonZeroRule
0070 } FillRule;
0071
0072 typedef enum
0073 {
0074 UndefinedGradient,
0075 LinearGradient,
0076 RadialGradient
0077 } GradientType;
0078
0079 typedef enum
0080 {
0081 UndefinedCap,
0082 ButtCap,
0083 RoundCap,
0084 SquareCap
0085 } LineCap;
0086
0087 typedef enum
0088 {
0089 UndefinedJoin,
0090 MiterJoin,
0091 RoundJoin,
0092 BevelJoin
0093 } LineJoin;
0094
0095 typedef enum
0096 {
0097 UndefinedMethod,
0098 PointMethod,
0099 ReplaceMethod,
0100 FloodfillMethod,
0101 FillToBorderMethod,
0102 ResetMethod
0103 } PaintMethod;
0104
0105 typedef enum
0106 {
0107 UndefinedPrimitive,
0108 AlphaPrimitive,
0109 ArcPrimitive,
0110 BezierPrimitive,
0111 CirclePrimitive,
0112 ColorPrimitive,
0113 EllipsePrimitive,
0114 ImagePrimitive,
0115 LinePrimitive,
0116 PathPrimitive,
0117 PointPrimitive,
0118 PolygonPrimitive,
0119 PolylinePrimitive,
0120 RectanglePrimitive,
0121 RoundRectanglePrimitive,
0122 TextPrimitive
0123 } PrimitiveType;
0124
0125 typedef enum
0126 {
0127 UndefinedReference,
0128 GradientReference
0129 } ReferenceType;
0130
0131 typedef enum
0132 {
0133 UndefinedSpread,
0134 PadSpread,
0135 ReflectSpread,
0136 RepeatSpread
0137 } SpreadMethod;
0138
0139 typedef enum
0140 {
0141 UndefinedWordBreakType,
0142 NormalWordBreakType,
0143 BreakWordBreakType
0144 } WordBreakType;
0145
0146 typedef struct _StopInfo
0147 {
0148 PixelInfo
0149 color;
0150
0151 double
0152 offset;
0153 } StopInfo;
0154
0155 typedef struct _GradientInfo
0156 {
0157 GradientType
0158 type;
0159
0160 RectangleInfo
0161 bounding_box;
0162
0163 SegmentInfo
0164 gradient_vector;
0165
0166 StopInfo
0167 *stops;
0168
0169 size_t
0170 number_stops;
0171
0172 SpreadMethod
0173 spread;
0174
0175 MagickBooleanType
0176 debug;
0177
0178 PointInfo
0179 center,
0180 radii;
0181
0182 double
0183 radius,
0184 angle;
0185
0186 size_t
0187 signature;
0188 } GradientInfo;
0189
0190 typedef struct _ElementReference
0191 {
0192 char
0193 *id;
0194
0195 ReferenceType
0196 type;
0197
0198 GradientInfo
0199 gradient;
0200
0201 struct _ElementReference
0202 *previous,
0203 *next;
0204
0205 size_t
0206 signature;
0207 } ElementReference;
0208
0209 typedef struct _DrawInfo
0210 {
0211 char
0212 *primitive,
0213 *geometry;
0214
0215 RectangleInfo
0216 viewbox;
0217
0218 AffineMatrix
0219 affine;
0220
0221 PixelInfo
0222 fill,
0223 stroke,
0224 undercolor,
0225 border_color;
0226
0227 Image
0228 *fill_pattern,
0229 *stroke_pattern;
0230
0231 double
0232 stroke_width;
0233
0234 GradientInfo
0235 gradient;
0236
0237 MagickBooleanType
0238 stroke_antialias,
0239 text_antialias;
0240
0241 FillRule
0242 fill_rule;
0243
0244 LineCap
0245 linecap;
0246
0247 LineJoin
0248 linejoin;
0249
0250 size_t
0251 miterlimit;
0252
0253 double
0254 dash_offset;
0255
0256 DecorationType
0257 decorate;
0258
0259 CompositeOperator
0260 compose;
0261
0262 char
0263 *text,
0264 *font,
0265 *metrics,
0266 *family;
0267
0268 size_t
0269 face;
0270
0271 StyleType
0272 style;
0273
0274 StretchType
0275 stretch;
0276
0277 size_t
0278 weight;
0279
0280 char
0281 *encoding;
0282
0283 double
0284 pointsize;
0285
0286 char
0287 *density;
0288
0289 AlignType
0290 align;
0291
0292 GravityType
0293 gravity;
0294
0295 char
0296 *server_name;
0297
0298 double
0299 *dash_pattern;
0300
0301 char
0302 *clip_mask;
0303
0304 SegmentInfo
0305 bounds;
0306
0307 ClipPathUnits
0308 clip_units;
0309
0310 Quantum
0311 alpha;
0312
0313 MagickBooleanType
0314 render;
0315
0316 ElementReference
0317 element_reference;
0318
0319 double
0320 kerning,
0321 interword_spacing,
0322 interline_spacing;
0323
0324 DirectionType
0325 direction;
0326
0327 MagickBooleanType
0328 debug;
0329
0330 size_t
0331 signature;
0332
0333 double
0334 fill_alpha,
0335 stroke_alpha;
0336
0337 MagickBooleanType
0338 clip_path;
0339
0340 Image
0341 *clipping_mask;
0342
0343 ComplianceType
0344 compliance;
0345
0346 Image
0347 *composite_mask;
0348
0349 char
0350 *id;
0351
0352 WordBreakType
0353 word_break;
0354
0355 ImageInfo
0356 *image_info;
0357 } DrawInfo;
0358
0359 typedef struct _PrimitiveInfo
0360 {
0361 PointInfo
0362 point;
0363
0364 size_t
0365 coordinates;
0366
0367 PrimitiveType
0368 primitive;
0369
0370 PaintMethod
0371 method;
0372
0373 char
0374 *text;
0375
0376 MagickBooleanType
0377 closed_subpath;
0378 } PrimitiveInfo;
0379
0380 typedef struct _TypeMetric
0381 {
0382 PointInfo
0383 pixels_per_em;
0384
0385 double
0386 ascent,
0387 descent,
0388 width,
0389 height,
0390 max_advance,
0391 underline_position,
0392 underline_thickness;
0393
0394 SegmentInfo
0395 bounds;
0396
0397 PointInfo
0398 origin;
0399 } TypeMetric;
0400
0401 extern MagickExport DrawInfo
0402 *AcquireDrawInfo(void),
0403 *CloneDrawInfo(const ImageInfo *,const DrawInfo *),
0404 *DestroyDrawInfo(DrawInfo *);
0405
0406 extern MagickExport MagickBooleanType
0407 DrawAffineImage(Image *,const Image *,const AffineMatrix *,ExceptionInfo *),
0408 DrawClipPath(Image *,const DrawInfo *,const char *,ExceptionInfo *),
0409 DrawGradientImage(Image *,const DrawInfo *,ExceptionInfo *),
0410 DrawImage(Image *,const DrawInfo *,ExceptionInfo *),
0411 DrawPatternPath(Image *,const DrawInfo *,const char *,Image **,
0412 ExceptionInfo *),
0413 DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *,ExceptionInfo *);
0414
0415 extern MagickExport void
0416 GetAffineMatrix(AffineMatrix *),
0417 GetDrawInfo(const ImageInfo *,DrawInfo *);
0418
0419 #if defined(__cplusplus) || defined(c_plusplus)
0420 }
0421 #endif
0422
0423 #endif