1{
2  Copyright 1999-2005 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  ImageMagick drawing methods.
17}
18
19//#include "magick/type.h"
20
21type
22 AlignType = (
23  UndefinedAlign,
24  LeftAlign,
25  CenterAlign,
26  RightAlign
27 );
28
29type
30 ClipPathUnits = (
31  UndefinedPathUnits,
32  UserSpace,
33  UserSpaceOnUse,
34  ObjectBoundingBox
35 );
36
37type
38 DecorationType = (
39  UndefinedDecoration,
40  NoDecoration,
41  UnderlineDecoration,
42  OverlineDecoration,
43  LineThroughDecoration
44 );
45
46type
47 FillRule = (
48  UndefinedRule,
49//#undef EvenOddRule
50  EvenOddRule,
51  NonZeroRule
52 );
53
54type
55 GradientType = (
56  UndefinedGradient,
57  LinearGradient,
58  RadialGradient
59 );
60
61type
62 LineCap = (
63  UndefinedCap,
64  ButtCap,
65  RoundCap,
66  SquareCap
67 );
68
69type
70 LineJoin = (
71  UndefinedJoin,
72  MiterJoin,
73  RoundJoin,
74  BevelJoin
75 );
76
77type
78 PaintMethod = (
79  UndefinedMethod,
80  PointMethod,
81  ReplaceMethod,
82  FloodfillMethod,
83  FillToBorderMethod,
84  ResetMethod
85 );
86
87type
88 PrimitiveType = (
89  UndefinedPrimitive,
90  PointPrimitive,
91  LinePrimitive,
92  RectanglePrimitive,
93  RoundRectanglePrimitive,
94  ArcPrimitive,
95  EllipsePrimitive,
96  CirclePrimitive,
97  PolylinePrimitive,
98  PolygonPrimitive,
99  BezierPrimitive,
100  ColorPrimitive,
101  MattePrimitive,
102  TextPrimitive,
103  ImagePrimitive,
104  PathPrimitive
105 );
106
107type
108 ReferenceType = (
109  UndefinedReference,
110  GradientReference
111 );
112
113type
114 SpreadMethod = (
115  UndefinedSpread,
116  PadSpread,
117  ReflectSpead,
118  RepeatSpread
119 );
120
121type
122  GradientInfo = record
123    type_: GradientType;
124
125    color: PixelPacket;
126
127    stop: SegmentInfo;
128
129    length: culong;
130
131    spread: SpreadMethod;
132
133    debug: MagickBooleanType;
134
135    signature: culong;
136
137    previous, next: Pointer;
138{  struct _GradientInfo
139    *previous,
140    *next;}
141  end;
142
143type
144  ElementReference = record
145    id: PChar;
146
147    type_: ReferenceType;
148
149    gradient: GradientInfo;
150
151    signature: culong;
152
153    previous, next: Pointer;
154{  struct _ElementReference
155    *previous,
156    *next;}
157  end;
158
159type
160  DrawInfo = record
161    primitive,
162    geometry: PChar;
163
164    viewbox: RectangleInfo;
165
166    affine: AffineMatrix;
167
168    gravity: GravityType;
169
170    fill,
171    stroke: PixelPacket;
172
173    stroke_width: double;
174
175    gradient: GradientInfo;
176
177    fill_pattern,
178    tile,
179    stroke_pattern: PImage;
180
181    stroke_antialias,
182    text_antialias: MagickBooleanType;
183
184    fill_rule: FillRule;
185
186    linecap_: LineCap;
187
188    linejoin_: LineJoin;
189
190    miterlimit: culong;
191
192    dash_offset: double;
193
194    decorate: DecorationType;
195
196    compose: CompositeOperator;
197
198    text: PChar;
199
200    face: culong;
201
202    font,
203    metrics,
204    family: PChar;
205
206    style: StyleType;
207
208    stretch: StretchType;
209
210    weight: culong;
211
212    encoding: PChar;
213
214    pointsize: double;
215
216    density: PChar;
217
218    align: AlignType;
219
220    undercolor,
221    border_color: PixelPacket;
222
223    server_name: PChar;
224
225    dash_pattern: Pdouble;
226
227    clip_path: PChar;
228
229    bounds: SegmentInfo;
230
231    clip_units: ClipPathUnits;
232
233    opacity: Quantum;
234
235    render: MagickBooleanType;
236
237    element_reference: ElementReference;
238
239    debug: MagickBooleanType;
240
241    signature: culong;
242  end;
243
244  PDrawInfo = ^DrawInfo;
245
246  PPDrawInfo = ^PDrawInfo;
247
248type
249  PointInfo = record
250    x, y: double;
251  end;
252
253  PPointInfo = ^PointInfo;
254
255type
256  PrimitiveInfo = record
257    point: PointInfo;
258
259    coordinates: culong;
260
261    primitive: PrimitiveType;
262
263    method: PaintMethod;
264
265    text: PChar;
266  end;
267
268type
269  TypeMetric = record
270    pixels_per_em: PointInfo;
271
272    ascent,
273    descent,
274    width,
275    height,
276    max_advance,
277    underline_position,
278    underline_thickness: double;
279
280    bounds: SegmentInfo;
281  end;
282
283{extern MagickExport DrawInfo
284  *CloneDrawInfo(const ImageInfo *,const DrawInfo *),
285  *DestroyDrawInfo(DrawInfo *);
286
287extern MagickExport MagickBooleanType
288  DrawAffineImage(Image *,const Image *,const AffineMatrix *),
289  DrawClipPath(Image *,const DrawInfo *,const char *),
290  DrawImage(Image *,const DrawInfo *),
291  DrawPatternPath(Image *,const DrawInfo *,const char *,Image **),
292  DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *);
293
294extern MagickExport void
295  GetAffineMatrix(AffineMatrix *),
296  GetDrawInfo(const ImageInfo *,DrawInfo *);}
297
298
299