MagickCore
6.9.12-67
Convert, Edit, Or Compose Bitmap Images
Main Page
Data Structures
Files
File List
All
Data Structures
draw.h
1
/*
2
Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization
3
dedicated to making software imaging solutions freely available.
4
5
You may not use this file except in compliance with the License. You may
6
obtain a copy of the License at
7
8
https://imagemagick.org/script/license.php
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
16
MagickCore drawing methods.
17
*/
18
#ifndef MAGICKCORE_DRAW_H
19
#define MAGICKCORE_DRAW_H
20
21
#include "magick/geometry.h"
22
#include "magick/image.h"
23
#include "magick/pixel.h"
24
#include "magick/type.h"
25
#include "magick/color.h"
26
27
#if defined(__cplusplus) || defined(c_plusplus)
28
extern
"C"
{
29
#endif
30
31
typedef
enum
32
{
33
UndefinedAlign,
34
LeftAlign,
35
CenterAlign,
36
RightAlign
37
} AlignType;
38
39
typedef
enum
40
{
41
UndefinedPathUnits,
42
UserSpace,
43
UserSpaceOnUse,
44
ObjectBoundingBox
45
} ClipPathUnits;
46
47
typedef
enum
48
{
49
UndefinedDecoration,
50
NoDecoration,
51
UnderlineDecoration,
52
OverlineDecoration,
53
LineThroughDecoration
54
} DecorationType;
55
56
typedef
enum
57
{
58
UndefinedDirection,
59
RightToLeftDirection,
60
LeftToRightDirection
61
} DirectionType;
62
63
typedef
enum
64
{
65
UndefinedRule,
66
#undef EvenOddRule
67
EvenOddRule,
68
NonZeroRule
69
} FillRule;
70
71
typedef
enum
72
{
73
UndefinedGradient,
74
LinearGradient,
75
RadialGradient
76
} GradientType;
77
78
typedef
enum
79
{
80
UndefinedCap,
81
ButtCap,
82
RoundCap,
83
SquareCap
84
} LineCap;
85
86
typedef
enum
87
{
88
UndefinedJoin,
89
MiterJoin,
90
RoundJoin,
91
BevelJoin
92
} LineJoin;
93
94
typedef
enum
95
{
96
UndefinedMethod,
97
PointMethod,
98
ReplaceMethod,
99
FloodfillMethod,
100
FillToBorderMethod,
101
ResetMethod
102
} PaintMethod;
103
104
typedef
enum
105
{
106
UndefinedPrimitive,
107
PointPrimitive,
108
LinePrimitive,
109
RectanglePrimitive,
110
RoundRectanglePrimitive,
111
ArcPrimitive,
112
EllipsePrimitive,
113
CirclePrimitive,
114
PolylinePrimitive,
115
PolygonPrimitive,
116
BezierPrimitive,
117
ColorPrimitive,
118
MattePrimitive,
119
TextPrimitive,
120
ImagePrimitive,
121
PathPrimitive
122
} PrimitiveType;
123
124
typedef
enum
125
{
126
UndefinedReference,
127
GradientReference
128
} ReferenceType;
129
130
typedef
enum
131
{
132
UndefinedSpread,
133
PadSpread,
134
ReflectSpread,
135
RepeatSpread
136
} SpreadMethod;
137
138
typedef
struct
_PointInfo
139
{
140
double
141
x,
142
y;
143
}
PointInfo
;
144
145
typedef
struct
_StopInfo
146
{
147
MagickPixelPacket
148
color;
149
150
MagickRealType
151
offset;
152
}
StopInfo
;
153
154
typedef
struct
_GradientInfo
155
{
156
GradientType
157
type;
158
159
RectangleInfo
160
bounding_box;
161
162
SegmentInfo
163
gradient_vector;
164
165
StopInfo
166
*stops;
167
168
size_t
169
number_stops;
170
171
SpreadMethod
172
spread;
173
174
MagickBooleanType
175
debug;
176
177
size_t
178
signature;
179
180
PointInfo
181
center;
182
183
MagickRealType
184
radius,
185
angle;
186
187
PointInfo
188
radii;
189
}
GradientInfo
;
190
191
typedef
struct
_ElementReference
192
{
193
char
194
*id;
195
196
ReferenceType
197
type;
198
199
GradientInfo
200
gradient;
201
202
size_t
203
signature;
204
205
struct
_ElementReference
206
*previous,
207
*next;
208
}
ElementReference
;
209
210
typedef
struct
_DrawInfo
211
{
212
char
213
*primitive,
214
*geometry;
215
216
RectangleInfo
217
viewbox;
218
219
AffineMatrix
220
affine;
221
222
GravityType
223
gravity;
224
225
PixelPacket
226
fill,
227
stroke;
228
229
double
230
stroke_width;
231
232
GradientInfo
233
gradient;
234
235
Image
236
*fill_pattern,
237
*tile,
238
*stroke_pattern;
239
240
MagickBooleanType
241
stroke_antialias,
242
text_antialias;
243
244
FillRule
245
fill_rule;
246
247
LineCap
248
linecap;
249
250
LineJoin
251
linejoin;
252
253
size_t
254
miterlimit;
255
256
double
257
dash_offset;
258
259
DecorationType
260
decorate;
261
262
CompositeOperator
263
compose;
264
265
char
266
*text;
267
268
size_t
269
face;
270
271
char
272
*font,
273
*metrics,
274
*family;
275
276
StyleType
277
style;
278
279
StretchType
280
stretch;
281
282
size_t
283
weight;
284
285
char
286
*encoding;
287
288
double
289
pointsize;
290
291
char
292
*density;
293
294
AlignType
295
align;
296
297
PixelPacket
298
undercolor,
299
border_color;
300
301
char
302
*server_name;
303
304
double
305
*dash_pattern;
306
307
char
308
*clip_mask;
309
310
SegmentInfo
311
bounds;
312
313
ClipPathUnits
314
clip_units;
315
316
Quantum
317
opacity;
318
319
MagickBooleanType
320
render;
321
322
ElementReference
323
element_reference;
324
325
MagickBooleanType
326
debug;
327
328
size_t
329
signature;
330
331
double
332
kerning,
333
interword_spacing,
334
interline_spacing;
335
336
DirectionType
337
direction;
338
339
double
340
fill_opacity,
341
stroke_opacity;
342
343
MagickBooleanType
344
clip_path;
345
346
Image
347
*clipping_mask;
348
349
ComplianceType
350
compliance;
351
352
Image
353
*composite_mask;
354
355
char
356
*id;
357
}
DrawInfo
;
358
359
typedef
struct
_PrimitiveInfo
360
{
361
PointInfo
362
point;
363
364
size_t
365
coordinates;
366
367
PrimitiveType
368
primitive;
369
370
PaintMethod
371
method;
372
373
char
374
*text;
375
376
MagickBooleanType
377
closed_subpath;
378
}
PrimitiveInfo
;
379
380
typedef
struct
_TypeMetric
381
{
382
PointInfo
383
pixels_per_em;
384
385
double
386
ascent,
387
descent,
388
width,
389
height,
390
max_advance,
391
underline_position,
392
underline_thickness;
393
394
SegmentInfo
395
bounds;
396
397
PointInfo
398
origin;
399
}
TypeMetric
;
400
401
extern
MagickExport
DrawInfo
402
*AcquireDrawInfo(
void
),
403
*CloneDrawInfo(
const
ImageInfo
*,
const
DrawInfo
*),
404
*DestroyDrawInfo(
DrawInfo
*);
405
406
extern
MagickExport MagickBooleanType
407
DrawAffineImage(
Image
*,
const
Image
*,
const
AffineMatrix
*),
408
DrawClipPath(
Image
*,
const
DrawInfo
*,
const
char
*),
409
DrawGradientImage(
Image
*,
const
DrawInfo
*),
410
DrawImage(
Image
*,
const
DrawInfo
*),
411
DrawPatternPath(
Image
*,
const
DrawInfo
*,
const
char
*,
Image
**),
412
DrawPrimitive(
Image
*,
const
DrawInfo
*,
const
PrimitiveInfo
*);
413
414
extern
MagickExport
void
415
GetAffineMatrix(
AffineMatrix
*),
416
GetDrawInfo(
const
ImageInfo
*,
DrawInfo
*);
417
418
#if defined(__cplusplus) || defined(c_plusplus)
419
}
420
#endif
421
422
#endif
_SegmentInfo
Definition:
image.h:105
_TypeMetric
Definition:
draw.h:380
_DrawInfo
Definition:
draw.h:210
_ImageInfo
Definition:
image.h:361
_AffineMatrix
Definition:
geometry.h:95
_PixelPacket
Definition:
pixel.h:131
_Image
Definition:
image.h:152
_StopInfo
Definition:
draw.h:145
_PrimitiveInfo
Definition:
draw.h:359
_MagickPixelPacket
Definition:
pixel.h:104
_ElementReference
Definition:
draw.h:191
_RectangleInfo
Definition:
geometry.h:123
_GradientInfo
Definition:
draw.h:154
_PointInfo
Definition:
draw.h:138
magick
draw.h
Generated by
1.8.5