~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/imagemagick/src/drawing_wand.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 wand API.
 
17
}
 
18
 
 
19
{
 
20
  Declaration from drawing-wand.c
 
21
}
 
22
type
 
23
 PathOperation = (
 
24
  PathDefaultOperation,
 
25
  PathCloseOperation,                        // Z|z (none) */
 
26
  PathCurveToOperation,                      // C|c (x1 y1 x2 y2 x y)+ */
 
27
  PathCurveToQuadraticBezierOperation,       // Q|q (x1 y1 x y)+ */
 
28
  PathCurveToQuadraticBezierSmoothOperation, // T|t (x y)+ */
 
29
  PathCurveToSmoothOperation,                // S|s (x2 y2 x y)+ */
 
30
  PathEllipticArcOperation,                  // A|a (rx ry x-axis-rotation large-arc-flag sweep-flag x y)+ */
 
31
  PathLineToHorizontalOperation,             // H|h x+ */
 
32
  PathLineToOperation,                       // L|l (x y)+ */
 
33
  PathLineToVerticalOperation,               // V|v y+ */
 
34
  PathMoveToOperation                        // M|m (x y)+ */
 
35
 );
 
36
 
 
37
type
 
38
 PathMode = (
 
39
  DefaultPathMode,
 
40
  AbsolutePathMode,
 
41
  RelativePathMode
 
42
 );
 
43
 
 
44
  DrawingWand = record
 
45
    id: Cardinal;
 
46
 
 
47
    name: array[0..MaxTextExtent] of Char;
 
48
 
 
49
    { Support structures }
 
50
  
 
51
    image: PImage;
 
52
 
 
53
    exception: ExceptionInfo;
 
54
 
 
55
    { MVG output string and housekeeping }
 
56
  
 
57
    mvg: PChar;               // MVG data
 
58
 
 
59
    mvg_alloc,                // total allocated memory
 
60
//    mvg_length: size_t;       // total MVG length
 
61
 
 
62
    mvg_width: Cardinal;      // current line width 
 
63
 
 
64
    { Pattern support }
 
65
    
 
66
    pattern_id: PChar;
 
67
 
 
68
    pattern_bounds: RectangleInfo;
 
69
 
 
70
//    pattern_offset: size_t;
 
71
 
 
72
    { Graphic wand }
 
73
    
 
74
    index: Cardinal;          // array index
 
75
 
 
76
    graphic_context: PPDrawInfo;
 
77
 
 
78
    filter_off: MagickBooleanType;    // true if not filtering attributes
 
79
 
 
80
    { Pretty-printing depth }
 
81
  
 
82
    indent_depth: Cardinal;       // number of left-hand pad characters 
 
83
 
 
84
    { Path operation support }
 
85
  
 
86
    path_operation: PathOperation;
 
87
 
 
88
    path_mode: PathMode;
 
89
 
 
90
    destroy,
 
91
    debug: MagickBooleanType;
 
92
 
 
93
    signature: Cardinal;
 
94
  end;
 
95
 
 
96
  PDrawingWand = ^DrawingWand;
 
97
 
 
98
const x = 9;
 
99
 
 
100
function DrawGetTextAlignment(const wand: PDrawingWand): AlignType; cdecl; external WandExport;
 
101
 
 
102
function DrawGetClipPath(const wand: PDrawingWand): PChar; cdecl; external WandExport;
 
103
function DrawGetException(const wand: PDrawingWand; severity: PExceptionType): PChar; cdecl; external WandExport;
 
104
function DrawGetFont(const wand: PDrawingWand): PChar; cdecl; external WandExport;
 
105
function DrawGetFontFamily(const wand: PDrawingWand): PChar; cdecl; external WandExport;
 
106
function DrawGetTextEncoding(const wand: PDrawingWand): PChar; cdecl; external WandExport;
 
107
function DrawGetVectorGraphics(const wand: PDrawingWand): PChar; cdecl; external WandExport;
 
108
 
 
109
function DrawGetClipUnits(const wand: PDrawingWand): ClipPathUnits; cdecl; external WandExport;
 
110
 
 
111
function DrawGetTextDecoration(const wand: PDrawingWand): DecorationType; cdecl; external WandExport;
 
112
 
 
113
function DrawGetFillAlpha(const wand: PDrawingWand): double; cdecl; external WandExport;
 
114
function DrawGetFontSize(const wand: PDrawingWand): double; cdecl; external WandExport;
 
115
function DrawGetStrokeDashArray(const wand: PDrawingWand; number_elements: Cardinal): PDouble; cdecl; external WandExport;
 
116
function DrawGetStrokeDashOffset(const wand: PDrawingWand): double; cdecl; external WandExport;
 
117
function DrawGetStrokeAlpha(const wand: PDrawingWand): double; cdecl; external WandExport;
 
118
function DrawGetStrokeWidth(const wand: PDrawingWand): double; cdecl; external WandExport;
 
119
 
 
120
function PeekDrawingWand(const wand: PDrawingWand): PDrawInfo; cdecl; external WandExport;
 
121
 
 
122
function CloneDrawingWand(const wand: PDrawingWand): PDrawingWand; cdecl; external WandExport;
 
123
function DestroyDrawingWand(wand: PDrawingWand): PDrawingWand; cdecl; external WandExport;
 
124
{ Sem documenta��o
 
125
function DrawAllocateWand(const DrawInfo *,Image *): PDrawingWand; cdecl; external WandExport;
 
126
}
 
127
function NewDrawingWand: PDrawingWand; cdecl; external WandExport;
 
128
 
 
129
function DrawGetClipRule(const wand: PDrawingWand): FillRule; cdecl; external WandExport;
 
130
function DrawGetFillRule(const wand: PDrawingWand): FillRule; cdecl; external WandExport;
 
131
 
 
132
function DrawGetGravity(const wand: PDrawingWand): GravityType; cdecl; external WandExport;
 
133
 
 
134
function DrawGetStrokeLineCap(const wand: PDrawingWand): LineCap; cdecl; external WandExport;
 
135
 
 
136
function DrawGetStrokeLineJoin(const wand: PDrawingWand): LineJoin; cdecl; external WandExport;
 
137
 
 
138
function DrawClearException(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
139
function DrawComposite(wand: PDrawingWand; const compose: CompositeOperator;
 
140
 const x, y, width, height: double; magick_wand: PMagickWand): MagickBooleanType; cdecl; external WandExport;
 
141
function DrawGetStrokeAntialias(const wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
142
function DrawGetTextAntialias(const wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
143
function DrawPopPattern(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
144
function DrawPushPattern(wand: PDrawingWand; const pattern_id: PChar;
 
145
 const x, y, width, height: double): MagickBooleanType; cdecl; external WandExport;
 
146
function DrawRender(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
147
function DrawSetClipPath(wand: PDrawingWand; const clip_path: PChar): MagickBooleanType; cdecl; external WandExport;
 
148
function DrawSetFillPatternURL(wand: PDrawingWand; const fill_url: PChar): MagickBooleanType; cdecl; external WandExport;
 
149
function DrawSetFont(wand: PDrawingWand; const font_name: PChar): MagickBooleanType; cdecl; external WandExport;
 
150
function DrawSetFontFamily(wand: PDrawingWand; const font_family: PChar): MagickBooleanType; cdecl; external WandExport;
 
151
function DrawSetStrokeDashArray(wand: PDrawingWand; const number_elements: Cardinal;
 
152
 const dash_array: Pdouble): MagickBooleanType; cdecl; external WandExport;
 
153
function DrawSetStrokePatternURL(wand: PDrawingWand; const stroke_url: PChar): MagickBooleanType; cdecl; external WandExport;
 
154
function DrawSetVectorGraphics(wand: PDrawingWand; const xml: PChar): MagickBooleanType; cdecl; external WandExport;
 
155
function IsDrawingWand(const wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
156
function PopDrawingWand(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
157
function PushDrawingWand(wand: PDrawingWand): MagickBooleanType; cdecl; external WandExport;
 
158
 
 
159
function DrawGetFontStretch(const wand: PDrawingWand): StretchType; cdecl; external WandExport;
 
160
 
 
161
function DrawGetFontStyle(const wand: PDrawingWand): StyleType; cdecl; external WandExport;
 
162
 
 
163
function DrawGetFontWeight(const wand: PDrawingWand): Cardinal; cdecl; external WandExport;
 
164
function DrawGetStrokeMiterLimit(const wand: PDrawingWand): Cardinal; cdecl; external WandExport;
 
165
 
 
166
procedure ClearDrawingWand(wand: PDrawingWand); cdecl; external WandExport;
 
167
procedure DrawAffine(wand: PDrawingWand; const affine: PAffineMatrix); cdecl; external WandExport;
 
168
procedure DrawAnnotation(wand: PDrawingWand; const  x, y: double;
 
169
 const text: PChar); cdecl; external WandExport;
 
170
procedure DrawArc(wand: PDrawingWand; const sx, sy, ex, ey, sd, ed: double); cdecl; external WandExport;
 
171
procedure DrawBezier(wand: PDrawingWand; const number_coordinates: Cardinal;
 
172
 const coordinates: PPointInfo); cdecl; external WandExport;
 
173
procedure DrawCircle(wand: PDrawingWand; const ox, oy, px, py: double); cdecl; external WandExport;
 
174
procedure DrawColor(wand: PDrawingWand; const x, y: double;
 
175
 const paint_method: PaintMethod); cdecl; external WandExport;
 
176
procedure DrawComment(wand: PDrawingWand; const comment: PChar); cdecl; external WandExport;
 
177
procedure DrawEllipse(wand: PDrawingWand; const ox, oy, rx, ry, start, end_: double); cdecl; external WandExport;
 
178
procedure DrawGetFillColor(const wand: PDrawingWand; fill_color: PPixelWand); cdecl; external WandExport;
 
179
procedure DrawGetStrokeColor(const wand: PDrawingWand; stroke_color: PPixelWand); cdecl; external WandExport;
 
180
procedure DrawGetTextUnderColor(const wand: PDrawingWand; under_color: PPixelWand); cdecl; external WandExport;
 
181
procedure DrawLine(wand: PDrawingWand; const sx, sy, ex, ey: double); cdecl; external WandExport;
 
182
procedure DrawMatte(wand: PDrawingWand; const x, y: double;
 
183
 const paint_method: PaintMethod); cdecl; external WandExport;
 
184
procedure DrawPathClose(wand: PDrawingWand); cdecl; external WandExport;
 
185
procedure DrawPathCurveToAbsolute(wand: PDrawingWand;
 
186
 const x1, y1, x2, y2, x, y: double); cdecl; external WandExport;
 
187
procedure DrawPathCurveToRelative(wand: PDrawingWand;
 
188
 const x1, y1, x2, y2, x, y: double); cdecl; external WandExport;
 
189
procedure DrawPathCurveToQuadraticBezierAbsolute(wand: PDrawingWand;
 
190
 const x1, y1, x, y: double); cdecl; external WandExport;
 
191
procedure DrawPathCurveToQuadraticBezierRelative(wand: PDrawingWand;
 
192
 const x1, y1, x, y: double); cdecl; external WandExport;
 
193
procedure DrawPathCurveToQuadraticBezierSmoothAbsolute(wand: PDrawingWand;
 
194
 const x, y: double); cdecl; external WandExport;
 
195
procedure DrawPathCurveToQuadraticBezierSmoothRelative(wand: PDrawingWand;
 
196
 const x, y: double); cdecl; external WandExport;
 
197
procedure DrawPathCurveToSmoothAbsolute(wand: PDrawingWand;
 
198
 const x2, y2, x, y: double); cdecl; external WandExport;
 
199
procedure DrawPathCurveToSmoothRelative(wand: PDrawingWand;
 
200
 const x2, y2, x, y: double); cdecl; external WandExport;
 
201
procedure DrawPathEllipticArcAbsolute(wand: PDrawingWand;
 
202
    const rx, ry, x_axis_rotation: double;
 
203
    const large_arc_flag: MagickBooleanType;
 
204
    const sweep_flag: MagickBooleanType; const x, y: double); cdecl; external WandExport;
 
205
procedure DrawPathEllipticArcRelative(wand: PDrawingWand;
 
206
    const rx, ry, x_axis_rotation: double;
 
207
    const large_arc_flag: MagickBooleanType;
 
208
    const sweep_flag: MagickBooleanType; const x, y: double); cdecl; external WandExport;
 
209
procedure DrawPathFinish(wand: PDrawingWand); cdecl; external WandExport;
 
210
procedure DrawPathLineToAbsolute(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
 
211
procedure DrawPathLineToRelative(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
 
212
{procedure DrawPathLineToHorizontalAbsolute(wand: PDrawingWand;
 
213
 const mode: PathMode; const x: double); cdecl; external WandExport;
 
214
procedure DrawPathLineToHorizontalRelative(wand: PDrawingWand); cdecl; external WandExport;
 
215
 
 
216
Contradi��o na declara��o
 
217
}
 
218
procedure DrawPathLineToVerticalAbsolute(wand: PDrawingWand; const y: double); cdecl; external WandExport;
 
219
procedure DrawPathLineToVerticalRelative(wand: PDrawingWand; const y: double); cdecl; external WandExport;
 
220
procedure DrawPathMoveToAbsolute(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
 
221
procedure DrawPathMoveToRelative(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
 
222
procedure DrawPathStart(wand: PDrawingWand); cdecl; external WandExport;
 
223
procedure DrawPoint(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
 
224
procedure DrawPolygon(wand: PDrawingWand; const number_coordinates: Cardinal; const coordinates: PPointInfo
 
225
 ); cdecl; external WandExport;
 
226
procedure DrawPolyline(wand: PDrawingWand; const number_coordinates: Cardinal; const coordinates: PPointInfo
 
227
 ); cdecl; external WandExport;
 
228
procedure DrawPopClipPath(wand: PDrawingWand); cdecl; external WandExport;
 
229
procedure DrawPopDefs(wand: PDrawingWand); cdecl; external WandExport;
 
230
procedure DrawPushClipPath(wand: PDrawingWand; clip_path_id: PChar); cdecl; external WandExport;
 
231
procedure DrawPushDefs(wand: PDrawingWand); cdecl; external WandExport;
 
232
procedure DrawRectangle(wand: PDrawingWand; const x1, y1, x2, y2: double); cdecl; external WandExport;
 
233
procedure DrawRotate(wand: PDrawingWand; const degrees: double); cdecl; external WandExport;
 
234
procedure DrawRoundRectangle(wand: PDrawingWand; const x1, y1, x2, y2, rx, ry: double); cdecl; external WandExport;
 
235
procedure DrawScale(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
 
236
procedure DrawSetClipRule(wand: PDrawingWand; const fill_rule: FillRule); cdecl; external WandExport;
 
237
procedure DrawSetClipUnits(wand: PDrawingWand; const clip_units: ClipPathUnits); cdecl; external WandExport;
 
238
procedure DrawSetFillColor(wand: PDrawingWand; const fill_wand: PPixelWand); cdecl; external WandExport;
 
239
procedure DrawSetFillAlpha(wand: PDrawingWand; const fill_opacity: double); cdecl; external WandExport;
 
240
procedure DrawSetFillRule(wand: PDrawingWand; const fill_rule: FillRule); cdecl; external WandExport;
 
241
procedure DrawSetFontSize(wand: PDrawingWand; const pointsize: double); cdecl; external WandExport;
 
242
procedure DrawSetFontStretch(wand: PDrawingWand; const font_stretch: StretchType); cdecl; external WandExport;
 
243
procedure DrawSetFontStyle(wand: PDrawingWand; const style: StyleType); cdecl; external WandExport;
 
244
procedure DrawSetFontWeight(wand: PDrawingWand; const font_weight: Cardinal); cdecl; external WandExport;
 
245
procedure DrawSetGravity(wand: PDrawingWand; const gravity: GravityType); cdecl; external WandExport;
 
246
procedure DrawSkewX(wand: PDrawingWand; const degrees: double); cdecl; external WandExport;
 
247
procedure DrawSkewY(wand: PDrawingWand; const degrees: double); cdecl; external WandExport;
 
248
procedure DrawSetStrokeAntialias(wand: PDrawingWand; const stroke_antialias: MagickBooleanType
 
249
 ); cdecl; external WandExport;
 
250
procedure DrawSetStrokeColor(wand: PDrawingWand; const stroke_wand: PPixelWand); cdecl; external WandExport;
 
251
procedure DrawSetStrokeDashOffset(wand: PDrawingWand; const dash_offset: double); cdecl; external WandExport;
 
252
procedure DrawSetStrokeLineCap(wand: PDrawingWand; const linecap_: LineCap); cdecl; external WandExport;
 
253
procedure DrawSetStrokeLineJoin(wand: PDrawingWand; const linejoin_: LineJoin); cdecl; external WandExport;
 
254
procedure DrawSetStrokeMiterLimit(wand: PDrawingWand; const miterlimit: Cardinal); cdecl; external WandExport;
 
255
procedure DrawSetStrokeAlpha(wand: PDrawingWand; const stroke_opacity: double); cdecl; external WandExport;
 
256
procedure DrawSetStrokeWidth(wand: PDrawingWand; const troke_width: double); cdecl; external WandExport;
 
257
procedure DrawSetTextAlignment(wand: PDrawingWand; const alignment: AlignType); cdecl; external WandExport;
 
258
procedure DrawSetTextAntialias(wand: PDrawingWand; const text_antialias: MagickBooleanType
 
259
 ); cdecl; external WandExport;
 
260
procedure DrawSetTextDecoration(wand: PDrawingWand; const decoration: DecorationType); cdecl; external WandExport;
 
261
procedure DrawSetTextEncoding(wand: PDrawingWand; const encoding: PChar); cdecl; external WandExport;
 
262
procedure DrawSetTextUnderColor(wand: PDrawingWand; const under_wand: PPixelWand); cdecl; external WandExport;
 
263
procedure DrawSetViewbox(wand: PDrawingWand; x1, y1, x2, y2: Cardinal); cdecl; external WandExport;
 
264
procedure DrawTranslate(wand: PDrawingWand; const x, y: double); cdecl; external WandExport;
 
265
 
 
266
{
 
267
  Deprecated.
 
268
}
 
269
{typedef struct _DrawingWand
 
270
  *DrawContext;
 
271
 
 
272
extern WandExport double
 
273
  DrawGetFillOpacity(const wand: PDrawingWand),
 
274
  DrawGetStrokeOpacity(const wand: PDrawingWand);
 
275
 
 
276
extern WandExport DrawInfo
 
277
  *DrawPeekGraphicWand(const wand: PDrawingWand);
 
278
 
 
279
extern WandExport void
 
280
  DrawPopGraphicContext(DrawingWand *),
 
281
  DrawPushGraphicContext(DrawingWand *),
 
282
  DrawSetFillOpacity(DrawingWand *,const double),
 
283
  DrawSetStrokeOpacity(DrawingWand *,const double);}