MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
draw.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2018 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  https://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 #include "MagickCore/geometry.h"
22 #include "MagickCore/image.h"
23 #include "MagickCore/pixel.h"
24 #include "MagickCore/type.h"
25 
26 #if defined(__cplusplus) || defined(c_plusplus)
27 extern "C" {
28 #endif
29 
30 typedef enum
31 {
36 } AlignType;
37 
38 typedef enum
39 {
45 
46 typedef enum
47 {
54 
55 typedef enum
56 {
61 
62 typedef enum
63 {
65 #undef EvenOddRule
68 } FillRule;
69 
70 typedef enum
71 {
75 } GradientType;
76 
77 typedef enum
78 {
83 } LineCap;
84 
85 typedef enum
86 {
91 } LineJoin;
92 
93 typedef enum
94 {
101 } PaintMethod;
102 
103 typedef enum
104 {
121 } PrimitiveType;
122 
123 typedef enum
124 {
127 } ReferenceType;
128 
129 typedef enum
130 {
135 } SpreadMethod;
136 
137 typedef struct _StopInfo
138 {
139  PixelInfo
141 
142  double
144 } StopInfo;
145 
146 typedef struct _GradientInfo
147 {
148  GradientType
150 
153 
156 
157  StopInfo
159 
160  size_t
162 
163  SpreadMethod
165 
168 
169  PointInfo
170  center,
171  radii;
172 
173  double
175  angle;
176 
177  size_t
179 } GradientInfo;
180 
181 typedef struct _ElementReference
182 {
183  char
184  *id;
185 
186  ReferenceType
188 
191 
193  *previous,
194  *next;
195 
196  size_t
199 
200 typedef struct _DrawInfo
201 {
202  char
204  *geometry;
205 
208 
211 
212  PixelInfo
213  fill,
214  stroke,
215  undercolor,
216  border_color;
217 
218  Image
219  *fill_pattern,
221 
222  double
224 
227 
229  stroke_antialias,
231 
232  FillRule
234 
235  LineCap
237 
238  LineJoin
240 
241  size_t
243 
244  double
246 
247  DecorationType
249 
252 
253  char
255  *font,
256  *metrics,
257  *family;
258 
259  size_t
261 
262  StyleType
264 
267 
268  size_t
270 
271  char
273 
274  double
276 
277  char
279 
280  AlignType
282 
285 
286  char
288 
289  double
291 
292  char
294 
297 
298  ClipPathUnits
300 
301  Quantum
303 
306 
309 
310  double
312  interword_spacing,
313  interline_spacing;
314 
315  DirectionType
317 
320 
321  size_t
323 
324  double
325  fill_alpha,
326  stroke_alpha;
327 } DrawInfo;
328 
329 
330 typedef struct _PrimitiveInfo
331 {
332  PointInfo
334 
335  size_t
337 
338  PrimitiveType
340 
341  PaintMethod
343 
344  char
346 } PrimitiveInfo;
347 
348 typedef struct _TypeMetric
349 {
350  PointInfo
352 
353  double
354  ascent,
355  descent,
356  width,
357  height,
358  max_advance,
359  underline_position,
360  underline_thickness;
361 
364 
365  PointInfo
367 } TypeMetric;
368 
369 extern MagickExport DrawInfo
370  *AcquireDrawInfo(void),
371  *CloneDrawInfo(const ImageInfo *,const DrawInfo *),
373 
376  DrawClipPath(Image *,const DrawInfo *,const char *,ExceptionInfo *),
378  DrawImage(Image *,const DrawInfo *,ExceptionInfo *),
379  DrawPatternPath(Image *,const DrawInfo *,const char *,Image **,
380  ExceptionInfo *),
382 
383 extern MagickExport void
385  GetDrawInfo(const ImageInfo *,DrawInfo *);
386 
387 #if defined(__cplusplus) || defined(c_plusplus)
388 }
389 #endif
390 
391 #endif
char * server_name
Definition: draw.h:287
PixelInfo undercolor
Definition: draw.h:213
MagickExport DrawInfo * AcquireDrawInfo(void)
char * primitive
Definition: draw.h:203
LineCap
Definition: draw.h:77
StyleType
Definition: type.h:40
MagickExport void GetAffineMatrix(AffineMatrix *)
size_t signature
Definition: draw.h:197
GravityType gravity
Definition: draw.h:284
Definition: draw.h:80
SegmentInfo bounds
Definition: draw.h:296
GradientType type
Definition: draw.h:149
RectangleInfo bounding_box
Definition: draw.h:152
MagickExport MagickBooleanType DrawPrimitive(Image *, const DrawInfo *, const PrimitiveInfo *, ExceptionInfo *)
Definition: draw.c:4314
LineCap linecap
Definition: draw.h:236
struct _PrimitiveInfo PrimitiveInfo
double kerning
Definition: draw.h:311
MagickBooleanType debug
Definition: draw.h:167
Definition: draw.h:89
ElementReference element_reference
Definition: draw.h:308
MagickBooleanType render
Definition: draw.h:305
size_t coordinates
Definition: draw.h:336
double pointsize
Definition: draw.h:275
Definition: draw.h:90
struct _DrawInfo DrawInfo
StyleType style
Definition: draw.h:263
DecorationType decorate
Definition: draw.h:248
MagickBooleanType debug
Definition: draw.h:319
MagickExport DrawInfo * CloneDrawInfo(const ImageInfo *, const DrawInfo *)
Definition: draw.h:33
PointInfo radii
Definition: draw.h:170
SpreadMethod spread
Definition: draw.h:164
Definition: draw.h:88
AffineMatrix affine
Definition: draw.h:210
Definition: image.h:151
SpreadMethod
Definition: draw.h:129
double stroke_width
Definition: draw.h:223
Image * stroke_pattern
Definition: draw.h:219
GradientType
Definition: draw.h:70
MagickBooleanType
Definition: magick-type.h:156
char * id
Definition: draw.h:184
ClipPathUnits
Definition: draw.h:38
LineJoin linejoin
Definition: draw.h:239
PixelInfo color
Definition: draw.h:140
double width
Definition: draw.h:354
MagickExport MagickBooleanType DrawPatternPath(Image *, const DrawInfo *, const char *, Image **, ExceptionInfo *)
PointInfo origin
Definition: draw.h:366
MagickExport DrawInfo * DestroyDrawInfo(DrawInfo *)
Definition: draw.c:822
struct _ElementReference * previous
Definition: draw.h:192
MagickExport MagickBooleanType DrawClipPath(Image *, const DrawInfo *, const char *, ExceptionInfo *)
PrimitiveType primitive
Definition: draw.h:339
DecorationType
Definition: draw.h:46
size_t face
Definition: draw.h:260
StretchType
Definition: type.h:25
FillRule fill_rule
Definition: draw.h:233
StopInfo * stops
Definition: draw.h:158
LineJoin
Definition: draw.h:85
GradientInfo gradient
Definition: draw.h:190
PointInfo pixels_per_em
Definition: draw.h:351
PointInfo point
Definition: draw.h:333
struct _ElementReference * next
Definition: draw.h:192
GravityType
Definition: geometry.h:76
char * density
Definition: draw.h:278
struct _GradientInfo GradientInfo
StretchType stretch
Definition: draw.h:266
double stroke_alpha
Definition: draw.h:325
PrimitiveType
Definition: draw.h:103
char * encoding
Definition: draw.h:272
GradientInfo gradient
Definition: draw.h:226
char * clip_mask
Definition: draw.h:293
SegmentInfo bounds
Definition: draw.h:363
Quantum alpha
Definition: draw.h:302
size_t signature
Definition: draw.h:322
struct _TypeMetric TypeMetric
unsigned short Quantum
Definition: magick-type.h:82
ReferenceType type
Definition: draw.h:187
AlignType align
Definition: draw.h:281
MagickExport MagickBooleanType DrawGradientImage(Image *, const DrawInfo *, ExceptionInfo *)
SegmentInfo gradient_vector
Definition: draw.h:155
MagickExport MagickBooleanType DrawImage(Image *, const DrawInfo *, ExceptionInfo *)
MagickBooleanType text_antialias
Definition: draw.h:229
char * text
Definition: draw.h:345
ClipPathUnits clip_units
Definition: draw.h:299
FillRule
Definition: draw.h:62
size_t miterlimit
Definition: draw.h:242
size_t signature
Definition: draw.h:178
PaintMethod method
Definition: draw.h:342
double dash_offset
Definition: draw.h:245
DirectionType
Definition: draw.h:55
char * text
Definition: draw.h:254
MagickExport void GetDrawInfo(const ImageInfo *, DrawInfo *)
Definition: draw.c:4938
MagickExport MagickBooleanType DrawAffineImage(Image *, const Image *, const AffineMatrix *, ExceptionInfo *)
CompositeOperator
Definition: composite.h:25
size_t number_stops
Definition: draw.h:161
PaintMethod
Definition: draw.h:93
#define MagickExport
double radius
Definition: draw.h:174
struct _ElementReference ElementReference
Definition: draw.h:81
Definition: draw.h:82
Definition: draw.h:41
double * dash_pattern
Definition: draw.h:290
CompositeOperator compose
Definition: draw.h:251
DirectionType direction
Definition: draw.h:316
double offset
Definition: draw.h:143
AlignType
Definition: draw.h:30
struct _StopInfo StopInfo
RectangleInfo viewbox
Definition: draw.h:207
ReferenceType
Definition: draw.h:123
size_t weight
Definition: draw.h:269