1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>render</title>
<link rel="stylesheet" href="../docutils-api.css" type="text/css" />
</head>
<body>
<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
<input type="hidden" name="domains" value="www.graphicsmagick.org" />
<input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" /> <input type="submit" name="sa" value="Search" /></span>
</form>
</div>
<div class="navmenu">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../project.html">Project</a></li>
<li><a href="../download.html">Download</a></li>
<li><a href="../README.html">Install</a></li>
<li><a href="../Hg.html">Source</a></li>
<li><a href="../NEWS.html">News</a> </li>
<li><a href="../utilities.html">Utilities</a></li>
<li><a href="../programming.html">Programming</a></li>
<li><a href="../reference.html">Reference</a></li>
</ul>
</div>
<div class="document" id="render">
<h1 class="title">render</h1>
<h2 class="subtitle" id="low-level-methods-to-draw-on-an-image">Low-level methods to draw on an image</h2>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#clonedrawinfo" id="id13">CloneDrawInfo</a></li>
<li><a class="reference internal" href="#destroydrawinfo" id="id14">DestroyDrawInfo</a></li>
<li><a class="reference internal" href="#drawaffineimage" id="id15">DrawAffineImage</a></li>
<li><a class="reference internal" href="#drawclippath" id="id16">DrawClipPath</a></li>
<li><a class="reference internal" href="#drawcompositemask" id="id17">DrawCompositeMask</a></li>
<li><a class="reference internal" href="#drawimage" id="id18">DrawImage</a></li>
<li><a class="reference internal" href="#drawpatternpath" id="id19">DrawPatternPath</a></li>
</ul>
</div>
<div class="section" id="clonedrawinfo">
<h1><a class="toc-backref" href="#id13">CloneDrawInfo</a></h1>
<div class="section" id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">
<a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *CloneDrawInfo( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info );
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>CloneDrawInfo() makes a copy of the given draw info structure. If NULL
is specified, a new DrawInfo structure is created initialized to
default values.</p>
<p>The format of the CloneDrawInfo method is:</p>
<pre class="literal-block">
<a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *CloneDrawInfo( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info );
</pre>
<dl class="docutils">
<dt>image_info:</dt>
<dd>The image info.</dd>
<dt>draw_info:</dt>
<dd>The draw info.</dd>
</dl>
</div>
</div>
<div class="section" id="destroydrawinfo">
<h1><a class="toc-backref" href="#id14">DestroyDrawInfo</a></h1>
<div class="section" id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">
void DestroyDrawInfo( <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info );
</pre>
</div>
<div class="section" id="id2">
<h2>Description</h2>
<p>DestroyDrawInfo() deallocates memory associated with an DrawInfo
structure. Nothing is done if the pointer passed is NULL.</p>
<p>The format of the DestroyDrawInfo method is:</p>
<pre class="literal-block">
void DestroyDrawInfo( <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info );
</pre>
<p>A description of each parameter follows:</p>
<dl class="docutils">
<dt>draw_info:</dt>
<dd>The draw info.</dd>
</dl>
</div>
</div>
<div class="section" id="drawaffineimage">
<h1><a class="toc-backref" href="#id15">DrawAffineImage</a></h1>
<div class="section" id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">
unsigned int DrawAffineImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#image">Image</a> *composite,
const <a class="reference external" href="../api/types.html#affinematrix">AffineMatrix</a> *affine );
</pre>
</div>
<div class="section" id="id4">
<h2>Description</h2>
<p>DrawAffineImage() composites the source over the destination image as
dictated by the affine transform.</p>
<p>The format of the DrawAffineImage method is:</p>
<pre class="literal-block">
unsigned int DrawAffineImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#image">Image</a> *composite,
const <a class="reference external" href="../api/types.html#affinematrix">AffineMatrix</a> *affine );
</pre>
<dl class="docutils">
<dt>image:</dt>
<dd>The image.</dd>
<dt>image:</dt>
<dd>The composite image.</dd>
<dt>affine:</dt>
<dd>The affine transform.</dd>
</dl>
</div>
</div>
<div class="section" id="drawclippath">
<h1><a class="toc-backref" href="#id16">DrawClipPath</a></h1>
<div class="section" id="id5">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail DrawClipPath( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info,
const char *name );
</pre>
</div>
<div class="section" id="id6">
<h2>Description</h2>
<p>DrawClipPath() draws the clip path on the image mask.</p>
<p>The format of the DrawClipPath method is:</p>
<pre class="literal-block">
MagickPassFail DrawClipPath( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info,
const char *name );
</pre>
<dl class="docutils">
<dt>image:</dt>
<dd>The image.</dd>
<dt>draw_info:</dt>
<dd>The draw info.</dd>
<dt>name:</dt>
<dd>The name of the clip path.</dd>
</dl>
</div>
</div>
<div class="section" id="drawcompositemask">
<h1><a class="toc-backref" href="#id17">DrawCompositeMask</a></h1>
<div class="section" id="id7">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail DrawCompositeMask( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info,
const char *name );
</pre>
</div>
<div class="section" id="id8">
<h2>Description</h2>
<p>DrawCompositeMask() draws the composite mask on the image mask.</p>
<p>The format of the DrawCompositeMask method is:</p>
<pre class="literal-block">
MagickPassFail DrawCompositeMask( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info,
const char *name );
</pre>
<dl class="docutils">
<dt>image:</dt>
<dd>The image.</dd>
<dt>draw_info:</dt>
<dd>The draw info.</dd>
<dt>name:</dt>
<dd>The name of the composite mask.</dd>
</dl>
</div>
</div>
<div class="section" id="drawimage">
<h1><a class="toc-backref" href="#id18">DrawImage</a></h1>
<div class="section" id="id9">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail DrawImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info );
</pre>
</div>
<div class="section" id="id10">
<h2>Description</h2>
<p>Use DrawImage() to draw a graphic primitive on your image. The primitive
may be represented as a string or filename. Precede the filename with an
"at" sign (@) and the contents of the file are drawn on the image. You
can affect how text is drawn by setting one or more members of the draw
info structure.</p>
<p>The format of the drawing primitive text is known as "MVG" ("Magick
Vector Graphics"), which is a powerful yet simple drawing syntax fronted
by the "MVG" coder, and substantially supporting W3C SVG 1.1
(<a class="reference external" href="https://www.w3.org/TR/SVG11/">https://www.w3.org/TR/SVG11/</a>) rendering when fronted by the "SVG" coder
(which translates SVG into MVG). The parser is non-validating and in fact
is designed to attempt to skip over unhandled textual elements which may be
passed through from the SVG coder. While being used as the basis of a useful
W3C SVG implementation and while SVG is commonly used on the "web" as an
untrusted input such as within web browsers, this implementation is not
designed to handle arbitrary untrusted inputs delivered from the "Internet".
The drawing capabilities are best used under controlled circumstances
where drawing inputs can be reasonably trusted.</p>
<p>Note that this is a legacy interface. Authors of new code should consider
using the Draw* methods defined by magick/draw.h since they are better
documented and less error prone.</p>
<p>The format of the DrawImage method is:</p>
<pre class="literal-block">
MagickPassFail DrawImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info );
</pre>
<p>A description of each parameter follows:</p>
<dl class="docutils">
<dt>image:</dt>
<dd>The image.</dd>
<dt>draw_info:</dt>
<dd>The draw info.</dd>
</dl>
</div>
</div>
<div class="section" id="drawpatternpath">
<h1><a class="toc-backref" href="#id19">DrawPatternPath</a></h1>
<div class="section" id="id11">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail DrawPatternPath( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info,
const char *name, <a class="reference external" href="../api/types.html#image">Image</a> ** pattern );
</pre>
</div>
<div class="section" id="id12">
<h2>Description</h2>
<p>DrawPatternPath() draws a pattern.</p>
<p>The format of the DrawPatternPath method is:</p>
<pre class="literal-block">
MagickPassFail DrawPatternPath( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#drawinfo">DrawInfo</a> *draw_info,
const char *name, <a class="reference external" href="../api/types.html#image">Image</a> ** pattern );
</pre>
<dl class="docutils">
<dt>image:</dt>
<dd>The image.</dd>
<dt>draw_info:</dt>
<dd>The draw info.</dd>
<dt>name:</dt>
<dd>The pattern name.</dd>
<dt>image:</dt>
<dd>The image.</dd>
</dl>
</div>
</div>
</div>
<hr class="docutils">
<div class="document">
<p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2020<!--SPONSOR_LOGO--></p>
</div>
</body>
</html>
|