MagickCore  7.0.8
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://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 #include "MagickCore/color.h"
26 
27 #if defined(__cplusplus) || defined(c_plusplus)
28 extern "C" {
29 #endif
30 
31 typedef enum
32 {
37 } AlignType;
38 
39 typedef enum
40 {
46 
47 typedef enum
48 {
55 
56 typedef enum
57 {
62 
63 typedef enum
64 {
66 #undef EvenOddRule
69 } FillRule;
70 
71 typedef enum
72 {
76 } GradientType;
77 
78 typedef enum
79 {
84 } LineCap;
85 
86 typedef enum
87 {
92 } LineJoin;
93 
94 typedef enum
95 {
102 } PaintMethod;
103 
104 typedef enum
105 {
122 } PrimitiveType;
123 
124 typedef enum
125 {
128 } ReferenceType;
129 
130 typedef enum
131 {
136 } SpreadMethod;
137 
138 typedef struct _StopInfo
139 {
140  PixelInfo
142 
143  double
145 } StopInfo;
146 
147 typedef struct _GradientInfo
148 {
151 
154 
157 
158  StopInfo
160 
161  size_t
163 
166 
169 
170  PointInfo
172  radii;
173 
174  double
176  angle;
177 
178  size_t
180 } GradientInfo;
181 
182 typedef struct _ElementReference
183 {
184  char
185  *id;
186 
189 
192 
194  *previous,
195  *next;
196 
197  size_t
200 
201 typedef struct _DrawInfo
202 {
203  char
205  *geometry;
206 
209 
212 
213  PixelInfo
215  stroke,
216  undercolor,
217  border_color;
218 
219  Image
222 
223  double
225 
228 
232 
233  FillRule
235 
236  LineCap
238 
239  LineJoin
241 
242  size_t
244 
245  double
247 
250 
253 
254  char
256  *font,
257  *metrics,
258  *family;
259 
260  size_t
262 
263  StyleType
265 
268 
269  size_t
271 
272  char
274 
275  double
277 
278  char
280 
281  AlignType
283 
286 
287  char
289 
290  double
292 
293  char
295 
298 
301 
302  Quantum
304 
307 
310 
311  double
315 
318 
321 
322  size_t
324 
325  double
327  stroke_alpha;
328 
331 
332  Image
334 
337 
338  Image
340 } DrawInfo;
341 
342 typedef struct _PrimitiveInfo
343 {
344  PointInfo
346 
347  size_t
349 
352 
355 
356  char
358 
361 } PrimitiveInfo;
362 
363 typedef struct _TypeMetric
364 {
365  PointInfo
367 
368  double
370  descent,
371  width,
372  height,
373  max_advance,
376 
379 
380  PointInfo
382 } TypeMetric;
383 
384 extern MagickExport DrawInfo
385  *AcquireDrawInfo(void),
386  *CloneDrawInfo(const ImageInfo *,const DrawInfo *),
388 
391  DrawClipPath(Image *,const DrawInfo *,const char *,ExceptionInfo *),
393  DrawImage(Image *,const DrawInfo *,ExceptionInfo *),
394  DrawPatternPath(Image *,const DrawInfo *,const char *,Image **,
395  ExceptionInfo *),
397 
398 extern MagickExport void
400  GetDrawInfo(const ImageInfo *,DrawInfo *);
401 
402 #if defined(__cplusplus) || defined(c_plusplus)
403 }
404 #endif
405 
406 #endif
char * server_name
Definition: draw.h:288
PixelInfo fill
Definition: draw.h:214
PixelInfo undercolor
Definition: draw.h:214
MagickExport DrawInfo * AcquireDrawInfo(void)
char * primitive
Definition: draw.h:204
LineCap
Definition: draw.h:78
double interword_spacing
Definition: draw.h:312
StyleType
Definition: type.h:40
MagickExport void GetAffineMatrix(AffineMatrix *)
size_t signature
Definition: draw.h:198
GravityType gravity
Definition: draw.h:285
Definition: draw.h:81
SegmentInfo bounds
Definition: draw.h:297
GradientType type
Definition: draw.h:150
RectangleInfo bounding_box
Definition: draw.h:153
MagickExport MagickBooleanType DrawPrimitive(Image *, const DrawInfo *, const PrimitiveInfo *, ExceptionInfo *)
Definition: draw.c:5066
LineCap linecap
Definition: draw.h:237
double interline_spacing
Definition: draw.h:312
struct _PrimitiveInfo PrimitiveInfo
PixelInfo stroke
Definition: draw.h:214
double kerning
Definition: draw.h:312
MagickBooleanType debug
Definition: draw.h:168
Definition: draw.h:90
ElementReference element_reference
Definition: draw.h:309
Image * fill_pattern
Definition: draw.h:220
MagickBooleanType render
Definition: draw.h:306
size_t coordinates
Definition: draw.h:348
double pointsize
Definition: draw.h:276
Definition: draw.h:91
double fill_alpha
Definition: draw.h:326
struct _DrawInfo DrawInfo
StyleType style
Definition: draw.h:264
DecorationType decorate
Definition: draw.h:249
MagickBooleanType debug
Definition: draw.h:320
MagickBooleanType clip_path
Definition: draw.h:330
MagickExport DrawInfo * CloneDrawInfo(const ImageInfo *, const DrawInfo *)
double angle
Definition: draw.h:175
Definition: draw.h:34
PointInfo radii
Definition: draw.h:171
SpreadMethod spread
Definition: draw.h:165
Definition: draw.h:89
AffineMatrix affine
Definition: draw.h:211
Definition: image.h:151
MagickBooleanType closed_subpath
Definition: draw.h:360
SpreadMethod
Definition: draw.h:130
double stroke_width
Definition: draw.h:224
Image * stroke_pattern
Definition: draw.h:220
GradientType
Definition: draw.h:71
MagickBooleanType
Definition: magick-type.h:156
char * id
Definition: draw.h:185
ClipPathUnits
Definition: draw.h:39
LineJoin linejoin
Definition: draw.h:240
PixelInfo color
Definition: draw.h:141
double width
Definition: draw.h:369
MagickExport MagickBooleanType DrawPatternPath(Image *, const DrawInfo *, const char *, Image **, ExceptionInfo *)
PointInfo origin
Definition: draw.h:381
double height
Definition: draw.h:369
MagickExport DrawInfo * DestroyDrawInfo(DrawInfo *)
Definition: draw.c:878
double descent
Definition: draw.h:369
Image * composite_mask
Definition: draw.h:339
struct _ElementReference * previous
Definition: draw.h:193
MagickExport MagickBooleanType DrawClipPath(Image *, const DrawInfo *, const char *, ExceptionInfo *)
PrimitiveType primitive
Definition: draw.h:351
PointInfo center
Definition: draw.h:171
char * metrics
Definition: draw.h:255
DecorationType
Definition: draw.h:47
size_t face
Definition: draw.h:261
StretchType
Definition: type.h:25
FillRule fill_rule
Definition: draw.h:234
StopInfo * stops
Definition: draw.h:159
char * family
Definition: draw.h:255
LineJoin
Definition: draw.h:86
GradientInfo gradient
Definition: draw.h:191
PointInfo pixels_per_em
Definition: draw.h:366
PointInfo point
Definition: draw.h:345
MagickBooleanType stroke_antialias
Definition: draw.h:230
struct _ElementReference * next
Definition: draw.h:193
GravityType
Definition: geometry.h:77
char * density
Definition: draw.h:279
struct _GradientInfo GradientInfo
StretchType stretch
Definition: draw.h:267
Image * clipping_mask
Definition: draw.h:333
double stroke_alpha
Definition: draw.h:326
PrimitiveType
Definition: draw.h:104
char * encoding
Definition: draw.h:273
GradientInfo gradient
Definition: draw.h:227
double max_advance
Definition: draw.h:369
double underline_thickness
Definition: draw.h:369
char * clip_mask
Definition: draw.h:294
SegmentInfo bounds
Definition: draw.h:378
Quantum alpha
Definition: draw.h:303
ComplianceType compliance
Definition: draw.h:336
size_t signature
Definition: draw.h:323
char * geometry
Definition: draw.h:204
struct _TypeMetric TypeMetric
unsigned short Quantum
Definition: magick-type.h:82
PixelInfo border_color
Definition: draw.h:214
ReferenceType type
Definition: draw.h:188
AlignType align
Definition: draw.h:282
MagickExport MagickBooleanType DrawGradientImage(Image *, const DrawInfo *, ExceptionInfo *)
SegmentInfo gradient_vector
Definition: draw.h:156
double underline_position
Definition: draw.h:369
MagickExport MagickBooleanType DrawImage(Image *, const DrawInfo *, ExceptionInfo *)
MagickBooleanType text_antialias
Definition: draw.h:230
char * text
Definition: draw.h:357
ClipPathUnits clip_units
Definition: draw.h:300
FillRule
Definition: draw.h:63
size_t miterlimit
Definition: draw.h:243
size_t signature
Definition: draw.h:179
PaintMethod method
Definition: draw.h:354
double dash_offset
Definition: draw.h:246
DirectionType
Definition: draw.h:56
char * text
Definition: draw.h:255
MagickExport void GetDrawInfo(const ImageInfo *, DrawInfo *)
Definition: draw.c:5715
MagickExport MagickBooleanType DrawAffineImage(Image *, const Image *, const AffineMatrix *, ExceptionInfo *)
double ascent
Definition: draw.h:369
CompositeOperator
Definition: composite.h:25
size_t number_stops
Definition: draw.h:162
PaintMethod
Definition: draw.h:94
#define MagickExport
double radius
Definition: draw.h:175
struct _ElementReference ElementReference
Definition: draw.h:82
Definition: draw.h:83
ComplianceType
Definition: color.h:28
Definition: draw.h:42
double * dash_pattern
Definition: draw.h:291
char * font
Definition: draw.h:255
CompositeOperator compose
Definition: draw.h:252
DirectionType direction
Definition: draw.h:317
double offset
Definition: draw.h:144
AlignType
Definition: draw.h:31
struct _StopInfo StopInfo
RectangleInfo viewbox
Definition: draw.h:208
ReferenceType
Definition: draw.h:124
size_t weight
Definition: draw.h:270