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