blob: a3ee26b6f16136f943d201bd0e881a52a52ae1e3 [file] [log] [blame]
cristy3eaa0ef2010-03-06 20:35:26 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
cristy2c839602010-04-03 02:32:08 +00003<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
cristy3eaa0ef2010-03-06 20:35:26 +00004<head>
cristy3de29cc2010-04-15 02:34:44 +00005 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
cristy3eaa0ef2010-03-06 20:35:26 +00006 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
7 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
cristy3de29cc2010-04-15 02:34:44 +00008 <style type="text/css" media="all">
cristy3eaa0ef2010-03-06 20:35:26 +00009 @import url("../www/magick.css");
cristy3de29cc2010-04-15 02:34:44 +000010 </style>
cristy3ed852e2009-09-05 21:47:34 +000011 <link rel="shortcut icon" href="../images/wand.ico" type="images/vnd.microsoft.icon"/>
12 <title>ImageMagick: Magick Vector Graphics</title>
13 <meta http-equiv="Content-Language" content="en-US"/>
14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
15 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
16 <meta name="Generator" content="PHP"/>
17 <meta name="Keywords" content="magick, vector, graphics, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
18 <meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
19 <meta name="Rating" content="GENERAL"/>
20 <meta name="Robots" content="INDEX, FOLLOW"/>
21 <meta name="Generator" content="ImageMagick Studio LLC"/>
22 <meta name="Author" content="ImageMagick Studio LLC"/>
23 <meta name="Revisit-after" content="2 DAYS"/>
24 <meta name="Resource-type" content="document"/>
cristy16af1cb2009-12-11 21:38:29 +000025 <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
cristy3ed852e2009-09-05 21:47:34 +000026 <meta name="Distribution" content="Global"/>
cristy3eaa0ef2010-03-06 20:35:26 +000027</head>
28
29<body id="www-imagemagick-org">
30<div class="titlebar">
31<a href="../index.html">
32 <img src="../images/script.png" alt="[ImageMagick]"
33 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
34<a href="http://www.networkredux.com">
35 <img src="../images/networkredux.png" alt="[sponsor]"
36 style="margin: 45px auto; border: 0px; float: left;" /></a>
37<a href="http://www.imagemagick.org/discourse-server/">
38 <img src="../images/logo.jpg" alt=""
39 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
40<a href="../index.html">
41 <img src="../images/sprite.jpg" alt=""
42 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
43</div>
44
cristyce69bb02010-07-27 19:49:46 +000045<div class="westbar">
cristy3eaa0ef2010-03-06 20:35:26 +000046
cristy3ed852e2009-09-05 21:47:34 +000047<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000048 <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000049</div>
cristy3eaa0ef2010-03-06 20:35:26 +000050<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +000051<div class="menu">
cristybb503372010-05-27 20:51:26 +000052 <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
53</div>
54<div class="sub">
55 <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
56</div>
57<div class="sub">
58 <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
59</div>
60<div class="sub">
61 <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
62</div>
63<div class="sep"></div>
64<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000065 <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +000066</div>
67<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000068 <a title="Command-line Tools: Processing" href="../www/command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +000069</div>
70<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000071 <a title="Command-line Tools: Options" href="../www/command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +000072</div>
73<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000074 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +000075</div>
76<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000077 <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +000078</div>
79<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000080 <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +000081</div>
82<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000083 <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +000084</div>
85<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000086 <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000087</div>
88<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000089 <a title="Program Interface: Magick++" href="../Magick++/">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +000090</div>
cristy3eaa0ef2010-03-06 20:35:26 +000091<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +000092<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000093 <a title="Install from Source" href="../www/install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +000094</div>
95<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000096 <a title="Install from Source: Unix" href="../www/install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +000097</div>
98<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000099 <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000100 </div>
101<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000102 <a title="Resources" href="../www/resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000103</div>
cristybb503372010-05-27 20:51:26 +0000104<div class="menu">
105 <a title="Architecture" href="../www/architecture.html">Architecture</a>
106</div>
cristy3ed852e2009-09-05 21:47:34 +0000107<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000108 <a title="Download" href="../www/download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000109</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000110<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000111<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000112 <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000113</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000114<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000115<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000116 <a title="Site Map"href="../www/sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000117</div>
118<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000119 <a title="Site Map: Links"href="../www/links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000120</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000121<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000122<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000123 <a title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
cristy3ed852e2009-09-05 21:47:34 +0000124
125<div class="sponsbox">
126<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000127 <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
cristy37f02952010-03-24 19:47:41 +0000128</div>
129<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000130 <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
cristy8f900122010-03-05 15:26:31 +0000131</div>
132<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000133 <a title="Sponsor: Deko.net" href="http://www.deko.net">Deko.net</a><!-- 201101010600 Peterssen-->
cristy5a3a8ca2009-09-20 22:36:18 +0000134</div>
135<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000136 <a title="Sponsor: Druckerei" href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
cristy916e1922009-10-01 12:52:47 +0000137</div>
138<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000139 <a title="Sponsor: Druckerei Online" href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
cristyb4c03bb2009-09-27 13:55:46 +0000140</div>
cristy23b89aa2010-06-28 18:08:37 +0000141<div class="sponsor">
cristya8902942010-07-30 00:49:52 +0000142 <a title="Sponsor: Free Catalogs" href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 20120801000600 -->
cristy23b89aa2010-06-28 18:08:37 +0000143</div>
cristy3ed852e2009-09-05 21:47:34 +0000144</div>
145</div>
cristyce69bb02010-07-27 19:49:46 +0000146</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000147
cristyce69bb02010-07-27 19:49:46 +0000148<div class="eastbar">
149 <script type="text/javascript">
150 <!--
151 google_ad_client = "pub-3129977114552745";
152 /* 160x600, created 7/27/10 */
153 google_ad_slot = "0574824969";
154 google_ad_width = 160;
155 google_ad_height = 600;
156 //-->
157 </script>
158 <script type="text/javascript"
159 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
160 </script>
cristy3eaa0ef2010-03-06 20:35:26 +0000161</div>
162
163<div class="main">
164
165
cristy3ed852e2009-09-05 21:47:34 +0000166<p class="navigation-index">[<a href="#intro">Introduction to Vector Graphics</a> &bull; <a href="#overview">MVG Overview</a> &bull; <a href="#primitives">Drawing Primitives</a>]</p>
167
168<h2><a name="intro"></a>Introduction to Vector Graphics</h2>
169<div class="doc-section">
170
171<p>This specification defines the features and syntax for Magick Vector Graphics (MVG), a modularized language for describing two-dimensional vector and mixed vector/raster graphics in ImageMagick. You can use the language to draw from the
172command line, from an MVG file, from an <a href="http://www.w3.org/TR/SVG/" >SVG -- Scalable Vector Graphics</a> file or from one of the ImageMagick <a href="../www/api.html">program interfaces</a>. Use this command, for example, to render an arc:</p>
173
174<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert -size 100x60 xc:skyblue -fill white -stroke black \ <br/>
175 -draw "path 'M 30,40 A 30,20 20 0,0 70,20 A 30,20 20 1,0 30,40 Z '" \ <br/>
176 arc.png</span></p>
177<p>and here is the result:</p>
178
179<p class="image">
180 <a href="../images/arc.png"><img src="../images/arc.png" width="100" height="60" alt="arc" /></a>
181</p>
182
183<p>When the drawing gets sufficiently complex, we recommend you assemble the graphic primitives into a MVG file. For our example, we use <a href="../www/source/piechart.mvg">piechart.mvg</a>:</p>
184
185<div class="viewport">
186<pre class="code">
187 push graphic-context
188 viewbox 0 0 624 369
189 affine 0.283636 0 0 0.283846 -0 -0
190 push graphic-context
191 push graphic-context
192 fill 'darkslateblue'
193 stroke 'blue'
194 stroke-width 1
195 rectangle 1,1 2199,1299
196 pop graphic-context
197 push graphic-context
198 font-size 40
199 fill 'white'
200 stroke-width 1
201 text 600,1100 'Average: 20.0'
202 pop graphic-context
203 push graphic-context
204 fill 'red'
205 stroke 'black'
206 stroke-width 5
207 path 'M700.0,600.0 L340.0,600.0 A360.0,360.0 0 0,1 408.1452123287954,389.2376150414973 z'
208 pop graphic-context
209 push graphic-context
210 font-size 40
211 fill 'white'
212 stroke-width 1
213 text 1400,140 'MagickWand for PHP'
214 pop graphic-context
215 push graphic-context
216 font-size 30
217 fill 'white'
218 stroke-width 1
219 text 1800,140 '(10.0%)'
220 pop graphic-context
221 push graphic-context
222 fill 'red'
223 stroke 'black'
224 stroke-width 4
225 rectangle 1330,100 1370,140
226 pop graphic-context
227 push graphic-context
228 fill 'yellow'
229 stroke 'black'
230 stroke-width 5
231 path 'M700.0,600.0 L408.1452123287954,389.2376150414973 A360.0,360.0 0 0,1 976.5894480359858,369.56936567559273 z'
232 pop graphic-context
233 push graphic-context
234 font-size 40
235 fill 'white'
236 stroke-width 1
237 text 1400,220 'MagickCore'
238 pop graphic-context
239 push graphic-context
240 font-size 30
241 fill 'white'
242 stroke-width 1
243 text 1800,220 '(29.0%)'
244 pop graphic-context
245 push graphic-context
246 fill 'yellow'
247 stroke 'black'
248 stroke-width 4
249 rectangle 1330,180 1370,220
250 pop graphic-context
251 push graphic-context
252 fill 'fuchsia'
253 stroke 'black'
254 stroke-width 5
255 path 'M700.0,600.0 L976.5894480359858,369.56936567559273 A360.0,360.0 0 0,1 964.2680466142854,844.4634932636567 z'
256 pop graphic-context
257 push graphic-context
258 font-size 40
259 fill 'white'
260 stroke-width 1
261 text 1400,300 'MagickWand'
262 pop graphic-context
263 push graphic-context
264 font-size 30
265 fill 'white'
266 stroke-width 1
267 text 1800,300 '(22.9%)'
268 pop graphic-context
269 push graphic-context
270 fill 'fuchsia'
271 stroke 'black'
272 stroke-width 4
273 rectangle 1330,260 1370,300
274 pop graphic-context
275 push graphic-context
276 fill 'blue'
277 stroke 'black'
278 stroke-width 5
279 path 'M700.0,600.0 L964.2680466142854,844.4634932636567 A360.0,360.0 0 0,1 757.853099990584,955.3210081341651 z'
280 pop graphic-context
281 push graphic-context
282 font-size 40
283 fill 'white'
284 stroke-width 1
285 text 1400,380 'JMagick'
286 pop graphic-context
287 push graphic-context
288 font-size 30
289 fill 'white'
290 stroke-width 1
291 text 1800,380 '(10.6%)'
292 pop graphic-context
293 push graphic-context
294 fill 'blue'
295 stroke 'black'
296 stroke-width 4
297 rectangle 1330,340 1370,380
298 pop graphic-context
299 push graphic-context
300 fill 'lime'
301 stroke 'black'
302 stroke-width 5
303 path 'M700.0,600.0 L757.853099990584,955.3210081341651 A360.0,360.0 0 0,1 340.0,600.0 z'
304 pop graphic-context
305 push graphic-context
306 font-size 40
307 fill 'white'
308 stroke-width 1
309 text 1400,460 'Magick++'
310 pop graphic-context
311 push graphic-context
312 font-size 30
313 fill 'white'
314 stroke-width 1
315 text 1800,460 '(27.5%)'
316 pop graphic-context
317 push graphic-context
318 fill 'lime'
319 stroke 'black'
320 stroke-width 4
321 rectangle 1330,420 1370,460
322 pop graphic-context
323 push graphic-context
324 font-size 100
325 fill 'white'
326 stroke-width 1
327 text 100,150 'ImageMagick'
328 pop graphic-context
329 push graphic-context
330 fill 'none'
331 stroke 'black'
332 stroke-width 5
333 circle 700,600 700,960
334 pop graphic-context
335 pop graphic-context
336 pop graphic-context
337</pre>
338</div>
339
340<p>to render a pie chart with this command:</p>
341
342<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert piechart.mvg piechart.png</span></p>
343<p>which produces this rendering:</p>
344
345<p class="image">
346 <a href="../images/piechart.png"><img src="../images/piechart.png" width="624" height="369" alt="piechart" /></a>
347</p>
348
349<p>However, in general, MVG is sufficiently difficult to work with that you probably want to use a program to generate your graphics in the SVG format. ImageMagick automagically converts SVG to MVG and renders your image, for example, we render <a href="../www/source/piechart.svg">piechart.svg</a> with this command:</p>
350
351<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert piechart.svg piechart.jpg</span></p>
352
353<p>to produce the same pie chart we created with the MVG language.</p>
354
355<p>Drawing is available from many of the ImageMagick <a href="../www/api.html">program interfaces</a> as well. ImageMagick converts the drawing API calls to MVG and renders it. Here is example code written in the <a href="../www/magick-wand.html">MagickWand</a> language: </p>
356
357<div class="viewport">
358<pre class="code">
359 (void) PushDrawingWand(draw_wand);
360 {
361 const PointInfo points[6] =
362 {
363 { 180,504 },
364 { 282.7,578.6 },
365 { 243.5,699.4 },
366 { 116.5,699.4 },
367 { 77.26,578.6 },
368 { 180,504 }
369 };
370
371 DrawSetStrokeAntialias(draw_wand,True);
372 DrawSetStrokeWidth(draw_wand,9);
373 DrawSetStrokeLineCap(draw_wand,RoundCap);
374 DrawSetStrokeLineJoin(draw_wand,RoundJoin);
375 (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
376 (void) PixelSetColor(color,"#4000c2");
377 DrawSetStrokeColor(draw_wand,color);
378 DrawSetFillRule(draw_wand,EvenOddRule);
379 (void) PixelSetColor(color,"#800000");
380 DrawSetFillColor(draw_wand,color);
381 DrawPolygon(draw_wand,6,points);
382 }
383 (void) PopDrawingWand(draw_wand);
384</pre>
385</div>
386
387</div>
388
389<h2><a name="overview"></a>MVG Overview</h2>
390<div class="doc-section">
391
392<p>MVG ignores all white-space between commands. This allows multiple MVG commands per line. It is common convention to terminate each MVG command with a new line to make MVG easier to edit and read. This syntax description uses indentation in MVG sequences to aid with understanding. Indentation is supported but is not required.</p>
393
394<p>Metafile wrapper syntax (to support stand-alone MVG files):</p>
395
396<pre class="text">
397 push graphic-context
398 viewbox 0 0 width height
399 [ any other MVG commands ]
400 pop graphic-context
401</pre>
402
403<p>Pattern syntax (saving and restoring context):</p>
404
405<pre class="text">
406 push pattern id x,y width,height
407 push graphic-context
408 [ drawing commands ]
409 pop graphic-context
410 pop pattern
411</pre>
412
413<p>an example is (%s is a identifier string):</p>
414
415<pre class="text">
416 push defs
417 push pattern %s 10,10 20,20
418 push graphic-context
419 fill red
420 rectangle 5,5 15,15
421 pop graphic-context
422 push graphic-context
423 fill green
424 rectangle 10,10 20,20
425 pop graphic-context
426 pop pattern
427 pop defs
428</pre>
429
430<p>For image tiling use:</p>
431
432<pre class="text">
433 push pattern id x,y width,height
434 image Copy ...
435 pop pattern
436</pre>
437
438<p>Note you can use the pattern for either the fill or stroke like:</p>
439
440<pre class="text">
441 stroke url(#%s)
442</pre>
443
444<p>or</p>
445
446<pre class="text">
447 fill url(#%s)
448</pre>
449
450<p>The clip path defines a clipping area, where only the contained area to be drawn upon. Areas outside of the clipping areare masked.</p>
451
452<pre class="text">
453 push defs
454 push clip-path %s
455 push graphic-context
456 rectangle 10,10 20,20
457 pop graphic-context
458 pop clip-path
459 pop defs
460 clip-path url(#%s)
461</pre>
462
463</div>
464
465<h2><a name="primitives"></a>Drawing Primitives</h2>
466<div class="doc-section">
467
468<p>Here is a complete description of the MVG drawing primitives:</p>
469
470<dl class="doc">
471
472 <dt class="doc"><a name="affine" id="affine"></a>affine <em class="option">s<sub>x</sub></em>,<em class="option">r<sub>x</sub></em>,<em class="option">r<sub>y</sub></em>,<em class="option">s<sub>y</sub></em>,<em class="option">t<sub>x</sub></em>,<em class="option">t<sub>y</sub></em></dt>
473
474 <dd></dd>
475
476
477
478 <dt class="doc"><a name="arc" id="arc"></a>arc <em class="option">x<sub>0</sub></em>,<em class="option">y<sub>0</sub></em>&nbsp; &nbsp;<em class="option">x<sub>1</sub></em>,<em class="option">y<sub>1</sub></em>&nbsp; &nbsp;<em class="option">a<sub>0</sub></em>,<em class="option">a<sub>1</sub></em></dt>
479
480 <dd></dd>
481
482 <dt class="doc"><a name="bezier" id="bezier"></a>bezier <em class="option">x<sub>0</sub></em>,<em class="option">y<sub>0</sub></em> ... <em class="option">x<sub>n</sub></em>,<em class="option">y<sub>n</sub></em></dt>
483
484 <dd>
485 <p><kbd>Bezier</kbd> (spline) requires three or more x,y coordinates to define its shape. The first and last points are the knots (preserved coordinates) and any intermediate coordinates are the control points. If two control points are specified, the line between each end knot and its sequentially respective control point determines the tangent direction of the curve at that end. If one control point is specified, the lines from the end knots to the one control point determines the tangent directions of the curve at each end. If more than two control points are specified, then the additional control points act in combination to determine the intermediate shape of the curve. In order to
486 draw complex curves, it is highly recommended either to use the <kbd>Path</kbd> primitive or to draw multiple four-point bezier segments with the start and end knots of each successive segment repeated.</p>
487 </dd>
488
489 <dt class="doc"><a name="border-color" id="border-color"></a>border-color <em class="option">color</em></dt>
490
491 <dd></dd>
492
493 <dt class="doc"><a name="circle" id="circle"></a>circle <em class="option">origin<sub>x</sub></em>,<em class="option">origin<sub>y</sub></em>&nbsp; &nbsp;<em class="option">perimeter<sub>x</sub></em>,<em class="option">perimeter<sub>y</sub></em></dt>
494
495 <dd></dd>
496
497 <dt class="doc"><a name="clip-path" id="clip-path"></a>clip-path url(<em class="option">name</em>)</dt>
498
499 <dd></dd>
500
501 <dt class="doc"><a name="clip-rule" id="clip-rule"></a>clip-rule <em class="option">rule</em></dt>
502
503 <dd>Choose from these rule types:
504
505 <p class="text">
506 evenodd <br/>
507 nonzero
508 </p>
509 </dd>
510
511 <dt class="doc"><a name="clip-units" id="clip-units"></a>clip-units <em class="option">units</em></dt>
512
513 <dd>Choose from these unit types:
514
515 <p class="text">
516 userSpace <br/>
517 userSpaceOnUse <br/>
518 objectBoundingBox <br/>
519 </p>
520 </dd>
521
522 <dt class="doc"><a name="color" id="color"></a>color <em class="option">x</em>,<em class="option">y</em> <em class="option">method</em></dt>
523
524
525
526
527
528
529
530
531
532
533
534<dd>Choose from these method types:
535
536<pre class="text">
537 point
538 replace
539 floodfill
540 filltoborder
541 reset
542</pre>
543
544</dd>
545
546 <dt class="doc"><a name="decorate" id="decorate"></a>decorate <em class="option">type</em></dt>
547
548
549<dd>Choose from these types of decorations:
550
551<pre class="text">
552 none
553 line-through
554 overline
555 underline
556</pre>
557
558</dd>
559
560 <dt class="doc"><a name="ellipse" id="ellipse"></a>ellipse <em class="option">center<sub>x</sub></em>,<em class="option">center<sub>y</sub></em>&nbsp; &nbsp;<em class="option">radius<sub>x</sub></em>,<em class="option">radius<sub>y</sub></em>&nbsp; &nbsp;<em class="option">arc<sub>start</sub></em>,<em class="option">arc<sub>stop</sub></em></dt>
561
562 <dt class="doc"><a name="fill" id="fill"></a>fill <em class="option">color</em></dt>
563
564<dd>Choose from any of these <a href="../www/color.html">colors</a>.
565</dd>
566
567 <dt class="doc"><a name="fill-opacity" id="fill-opacity"></a>fill-opacity <em class="option">opacity</em></dt>
568
569
570<dd>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).
571</dd>
572
573 <dt class="doc"><a name="fill-rule" id="fill-rule"></a>fill-rule <em class="option">rule</em></dt>
574
575
576<dd>Choose from these rule types:
577
578<pre class="text">
579 evenodd
580 nonzero
581</pre>
582
583</dd>
584
585 <dt class="doc"><a name="font" id="font"></a>font <em class="option">name</em></dt>
586
587<dd></dd>
588
589 <dt class="doc"><a name="font-family" id="font-family"></a>font-family <em class="option">family</em></dt>
590
591<dd></dd>
592
593 <dt class="doc"><a name="font-size" id="font-size"></a>font-size <em class="option">point-size</em></dt>
594
595<dd></dd>
596
597 <dt class="doc"><a name="font-stretch" id="font-stretch"></a>font-stretch <em class="option">type</em></dt>
598
599<dd>Choose from these stretch types:
600
601<pre class="text">
602 all
603 normal
604 ultra-condensed
605 extra-condensed
606 condensed
607 semi-condensed
608 semi-expanded
609 expanded
610 extra-expanded
611 ultra-expanded
612</pre>
613
614</dd>
615
616 <dt class="doc"><a name="font-style" id="font-style"></a>font-style <em class="option">style</em></dt>
617
618
619<dd>Choose from these styles:
620
621<pre class="text">
622 all
623 normal
624 italic
625 oblique
626</pre>
627
628</dd>
629
630 <dt class="doc"><a name="font-weight" id="font-weight"></a>font-weight <em class="option">weight</em></dt>
631
632<dd>Choose from these weights:
633
634<pre class="text">
635 all
636 normal
637 bold
638 100
639 200
640 300
641 400
642 500
643 600
644 700
645 800
646 900
647</pre>
648
649</dd>
650
651 <dt class="doc"><a name="gradient-units" id="gradient-units"></a>gradient-units <em class="option">units</em></dt>
652
653<dd>Choose from these units:
654
655<pre class="text">
656 userSpace
657 userSpaceOnUse
658 objectBoundingBox
659</pre>
660
661</dd>
662
663 <dt class="doc"><a name="gravity" id="gravity"></a>gravity <em class="option">type</em></dt>
664
665<dd>Choose from these gravity types:
666
667<pre class="text">
668 NorthWest
669 North
670 NorthEast
671 West
672 Center
673 East
674 SouthWest
675 South
676 SouthEast
677</pre>
678
679</dd>
680
681 <dt class="doc"><a name="image" id="image"></a>image <em class="option">compose x,y width,height 'filename'</em></dt>
682
683<dd>Choose from these compose operations:
684
685<table id="table" cellpadding="2" cellspacing="0" style="width: 93%">
686 <tbody>
687 <tr valign="top">
688 <th align="left" style="width: 8%">Method</th>
689 <th align="left">Description</th>
690 </tr>
691
692 <tr valign="top">
693 <td valign="top">clear</td>
694 <td valign="top">Both the color and the alpha of the destination are cleared. Neither the source nor the destination are used as input.</td>
695 </tr>
696
697 <tr valign="top">
698 <td valign="top">src</td>
699 <td valign="top">The source is copied to the destination. The destination is not used as input.</td>
700 </tr>
701
702 <tr valign="top">
703 <td valign="top">dst</td>
704 <td valign="top">The destination is left untouched.</td>
705 </tr>
706
707 <tr valign="top">
708 <td valign="top"><b>src-over</b></td>
709 <td valign="top">The source is composited over the destination.</td>
710 </tr>
711
712 <tr valign="top">
713 <td valign="top">dst-over</td>
714 <td valign="top">The destination is composited over the source and the result replaces the destination.</td>
715 </tr>
716
717 <tr valign="top">
718 <td valign="top">src-in</td>
719 <td valign="top">The part of the source lying inside of the destination replaces the destination.</td>
720 </tr>
721
722 <tr valign="top">
723 <td valign="top">dst-in</td>
724 <td valign="top">The part of the destination lying inside of the source replaces the destination.</td>
725 </tr>
726
727 <tr valign="top">
728 <td valign="top">src-out</td>
729 <td valign="top">The part of the source lying outside of the destination replaces the destination.</td>
730 </tr>
731
732 <tr valign="top">
733 <td valign="top">dst-out</td>
734 <td valign="top">The part of the destination lying outside of the source replaces the destination.</td>
735 </tr>
736
737 <tr valign="top">
738 <td valign="top">src-atop</td>
739 <td valign="top">The part of the source lying inside of the destination is composited onto the destination.</td>
740 </tr>
741
742 <tr valign="top">
743 <td valign="top">dst-atop</td>
744 <td valign="top">The part of the destination lying inside of the source is composited over the source and replaces the destination.</td>
745 </tr>
746
747 <tr valign="top">
748 <td valign="top">multiply</td>
749 <td valign="top">The source is multiplied by the destination and replaces the destination. The resultant color is always at least as dark as either of the two constituent colors. Multiplying any color with black produces black. Multiplying any color with white leaves the original color unchanged.</td>
750 </tr>
751
752 <tr valign="top">
753 <td valign="top">screen</td>
754 <td valign="top">The source and destination are complemented and then multiplied and then replace the destination. The resultant color is always at least as light as either of the two constituent colors. Screening any color with white produces white. Screening any color with black leaves the original color unchanged.</td>
755 </tr>
756
757 <tr valign="top">
758 <td valign="top">overlay</td>
759 <td valign="top">Multiplies or screens the colors, dependent on the destination color. Source colors overlay the destination whilst preserving its highlights and shadows. The destination color is not replaced, but is mixed with the source color to reflect the lightness or darkness of the destination.</td>
760 </tr>
761
762 <tr valign="top">
763 <td valign="top">darken</td>
764 <td valign="top">Selects the darker of the destination and source colors. The destination is replaced with the source when the source is darker, otherwise it is left unchanged.</td>
765 </tr>
766
767 <tr valign="top">
768 <td valign="top">lighten</td>
769 <td valign="top">Selects the lighter of the destination and source colors. The destination is replaced with the source when the source is lighter, otherwise it is left unchanged.</td>
770 </tr>
771
772 <tr valign="top">
773 <td valign="top">linear-light</td>
774 <td valign="top">Increase contrast slightly with an impact on the foreground's tonal values.</td>
775 </tr>
776
777 <tr valign="top">
778 <td valign="top">color-dodge</td>
779 <td valign="top">Brightens the destination color to reflect the source color. Painting with black produces no change.</td>
780 </tr>
781
782 <tr valign="top">
783 <td valign="top">color-burn</td>
784 <td valign="top">Darkens the destination color to reflect the source color. Painting with white produces no change.</td>
785 </tr>
786
787 <tr valign="top">
788 <td valign="top">hard-light</td>
789 <td valign="top">Multiplies or screens the colors, dependent on the source color value. If the source color is lighter than 0.5, the destination is lightened as if it were screened. If the source color is darker than 0.5, the destination is darkened, as if it were multiplied. The degree of lightening or darkening is proportional to the difference between the source color and 0.5. If it is equal to 0.5 the destination is unchanged. Painting with pure black or white produces black or white.</td>
790 </tr>
791
792 <tr valign="top">
793 <td valign="top">soft-light</td>
794 <td valign="top">Darkens or lightens the colors, dependent on the source color value. If the source color is lighter than 0.5, the destination is lightened. If the source color is darker than 0.5, the destination is darkened, as if it were burned in. The degree of darkening or lightening is proportional to the difference between the source color and 0.5. If it is equal to 0.5, the destination is unchanged. Painting with pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white.</td>
795 </tr>
796
797 <tr valign="top">
798 <td valign="top">plus</td>
799 <td valign="top">The source is added to the destination and replaces the destination. This operator is useful for animating a dissolve between two images.</td>
800 </tr>
801
802 <tr valign="top">
803 <td valign="top">add</td>
804 <td valign="top">As per 'plus' but transparency data is treated as matte
805 values. As such any transparent areas in either image remain
806 transparent. </td>
807 </tr>
808
809 <tr valign="top">
810 <td valign="top">minus</td>
811 <td valign="top">Subtract the colors in the source image from the
812 destination image. When transparency is involved, Opaque areas will be
813 subtracted from any destination opaque areas. </td>
814 </tr>
815
816 <tr valign="top">
817 <td valign="top">subtract</td>
818 <td valign="top">Subtract the colors in the source image from the
819 destination image. When transparency is involved transparent areas are
820 subtracted, so only the opaque areas in the source remain opaque in
821 the destination image. </td>
822 </tr>
823
824 <tr valign="top">
825 <td valign="top">difference</td>
826 <td valign="top">Subtracts the darker of the two constituent colors from the lighter. Painting with white inverts the destination color. Painting with black produces no change.</td>
827 </tr>
828
829 <tr valign="top">
830 <td valign="top">exclusion</td>
831 <td valign="top">Produces an effect similar to that of 'difference', but appears as lower contrast. Painting with white inverts the destination color. Painting with black produces no change.</td>
832 </tr>
833
834 <tr valign="top">
835 <td valign="top">xor</td>
836 <td valign="top">The part of the source that lies outside of the destination is combined with the part of the destination that lies outside of the source.</td>
837 </tr>
838
839 <tr valign="top">
840 <td valign="top">copy-*</td>
841 <td valign="top">Copy the specificed channel in the source image to the
842 same channel in the destination image. If the channel specified in
843 the source image does not exist, (which can only happen for methods,
844 '<kbd>copy-opacity</kbd>' or '<kbd>copy-black</kbd>') then it is
845 assumed that the source image is a special grayscale channel image
846 of the values to be copied. </td>
847 </tr>
848
849 <tr valign="top">
850 <td valign="top">change-mask</td>
851 <td valign="top">Replace any destination pixel that is the similar to the source images pixel (as defined by the current <a href="#fuzz">-fuzz</a> factor), with transparency. </td>
852 </tr>
853 </tbody>
854</table>
855
856</dd>
857
cristyf3bb4782009-09-08 13:10:04 +0000858 <dt class="doc"><a name="interline-spacing" id="interline-spacing"></a>interline-spacing <em class="option">pixels</em></dt>
859
860 <dd></dd>
861
cristy3ed852e2009-09-05 21:47:34 +0000862 <dt class="doc"><a name="interword-spacing" id="interword-spacing"></a>interword-spacing <em class="option">pixels</em></dt>
863
864 <dd></dd>
865
866 <dt class="doc"><a name="kerning" id="kerning"></a>kerning <em class="option">pixels</em></dt>
867
868 <dd></dd>
869
870 <dt class="doc"><a name="line" id="line"></a>line <em class="option">x,y x<sub>1</sub>,y<sub>1</sub></em></dt>
871
872 <dd></dd>
873
874 <dt class="doc"><a name="matte" id="matte"></a>matte <em class="option">x,y method</em></dt>
875
876<dd>Choose from these methods:
877
878<pre class="text">
879 point
880 replace
881 floodfill
882 filltoborder
883 reset
884</pre>
885
886</dd>
887
888 <dt class="doc"><a name="offset" id="offset"></a>offset <em class="option">offset</em></dt>
889
890 <dd></dd>
891
892 <dt class="doc"><a name="opacity" id="opacity"></a>opacity <em class="option">opacity</em></dt>
893
894<dd>Use percent (e.g. 50%).</dd>
895
896 <dt class="doc"><a name="path" id="path"></a>path <em class="option">path</em></dt>
897
898 <dd></dd>
899
900 <dt class="doc"><a name="point" id="point"></a>point <em class="option">x,y</em></dt>
901
902 <dd></dd>
903
904 <dt class="doc"><a name="polygon" id="polygon"></a>polygon <em class="option">x,y x<sub>1</sub>,y<sub>1</sub>, ..., x<sub>n</sub>,y<sub>n</sub></em></dt>
905
906 <dd></dd>
907
908 <dt class="doc"><a name="polyline" id="polyline"></a>polyline <em class="option">x,y x<sub>1</sub>,y<sub>1</sub>, ..., x<sub>n</sub>,y<sub>n</sub></em></dt>
909
910 <dd></dd>
911
912 <dt class="doc"><a name="pop-clip-path" id="pop-clip-path"></a>pop clip-path</dt>
913
914 <dd></dd>
915
916 <dt class="doc"><a name="pop-defs" id="pop-defs"></a>pop defs</dt>
917
918 <dd></dd>
919
920 <dt class="doc"><a name="pop-gradient" id="pop-gradient"></a>pop gradient</dt>
921
922 <dd></dd>
923
924 <dt class="doc"><a name="pop-graphic-context" id="pop-graphic-context"></a>pop graphic-context</dt>
925
926 <dd></dd>
927
928 <dt class="doc"><a name="pop-pattern" id="pop-pattern"></a>pop pattern</dt>
929
930 <dd></dd>
931
932 <dt class="doc"><a name="push" id="push"></a>push clip-path <em class="option">name</em></dt>
933
934 <dd></dd>
935
936 <dt class="doc"><a name="push-defs" id="push-defs"></a>push defs</dt>
937
938 <dd></dd>
939
940 <dt class="doc"><a name="push-gradient-linear" id="push-gradient-linear"></a>push gradient <em class="option">id linear x,y x<sub>1</sub>,y<sub>1</sub></em></dt>
941
942 <dd></dd>
943
944 <dt class="doc"><a name="push-gradient-radial" id="push-gradient-radial"></a>push gradient <em class="option">id radial x<sub>c</sub>,c<sub>y</sub> x<sub>f</sub>,y<sub>f</sub> radius</em></dt>
945
946 <dd></dd>
947
948 <dt class="doc"><a name="push-graphic-context" id="push-graphic-context"></a>push graphic-context</dt>
949
950 <dd></dd>
951
952 <dt class="doc"><a name="push-pattern" id="push-pattern"></a>push pattern <em class="option">id radial x,y width,height</em></dt>
953
954 <dd></dd>
955
956 <dt class="doc"><a name="rectangle" id="rectangle"></a>rectangle <em class="option">x,y x<sub>1</sub>,y<sub>1</sub></em></dt>
957
958 <dd></dd>
959
960 <dt class="doc"><a name="rotate" id="rotate"></a>rotate <em class="option">angle</em></dt>
961
962 <dd></dd>
963
964 <dt class="doc"><a name="roundrectangle" id="roundrectangle"></a>roundrectangle <em class="option">x,y x<sub>1</sub>,y<sub>1</sub> width,height</em></dt>
965
966 <dd></dd>
967
968 <dt class="doc"><a name="scale" id="scale"></a>scale <em class="option">x,y</em></dt>
969
970 <dd></dd>
971
972 <dt class="doc"><a name="skewX" id="skewX"></a>skewX <em class="option">angle</em></dt>
973
974 <dd></dd>
975
976 <dt class="doc"><a name="skewY" id="skewY"></a>skewX <em class="option">angle</em></dt>
977
978 <dd></dd>
979
980 <dt class="doc"><a name="stop-color" id="stop-color"></a>stop-color <em class="option">color offset</em></dt>
981
982 <dd></dd>
983
984 <dt class="doc"><a name="stroke" id="stroke"></a>stroke <em class="option">color</em></dt>
985
986 <dd></dd>
987
988 <dt class="doc"><a name="stroke-antialias" id="stroke-antialias"></a>stroke-antialias <em class="option">0 &bull; 1</em></dt>
989
990 <dd></dd>
991
992 <dt class="doc"><a name="stroke-dasharray" id="stroke-dasharray"></a>stroke-dasharray <em class="option">none &bull; numeric-list</em></dt>
993
994 <dd></dd>
995
996 <dt class="doc"><a name="stroke-dashoffset" id="stroke-dashoffset"></a>stroke-dashoffset <em class="option">offset</em></dt>
997
998 <dd></dd>
999
1000 <dt class="doc"><a name="stroke-linecap" id="stroke-linecap"></a>stroke-linecap <em class="option">type</em></dt>
1001
1002
1003 <dd>Choose from these cap types:
1004
1005<pre class="text">
1006 butt
1007 round
1008 square
1009</pre>
1010
1011 </dd>
1012
1013 <dt class="doc"><a name="stroke-linejoin" id="stroke-linejoin"></a>stroke-linejoin <em class="option">type</em></dt>
1014
1015 <dd>Choose from these join types:
1016
1017<pre class="text">
1018 bevel
1019 miter
1020 round
1021</pre>
1022
1023 </dd>
1024
1025 <dt class="doc"><a name="stroke-miterlimit" id="stroke-miterlimit"></a>stroke-miterlimit <em class="option">limit</em></dt>
1026
1027 <dd></dd>
1028
1029 <dt class="doc"><a name="stroke-opacity" id="stroke-opacity"></a>stroke-opacity <em class="option">opacity</em></dt>
1030
1031 <dd>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).
1032 </dd>
1033
1034 <dt class="doc"><a name="stroke-width" id="stroke-width"></a>stroke-width <em class="option">width</em></dt>
1035
1036 <dd></dd>
1037
1038 <dt class="doc"><a name="text" id="text"></a>text <em class="option">"text"</em></dt>
1039
1040 <dd></dd>
1041
1042 <dt class="doc"><a name="text-antialias" id="text-antialias"></a>text-antialias <em class="option">0 &bull; 1</em></dt>
1043
1044 <dd></dd>
1045
1046 <dt class="doc"><a name="text-undercolor" id="text-undercolor"></a>text-undercolor <em class="option">color</em></dt>
1047
1048 <dd></dd>
1049
1050 <dt class="doc"><a name="translate" id="translate"></a>translate <em class="option">x,y</em></dt>
1051
1052 <dd></dd>
1053
1054 <dt class="doc"><a name="viewbox" id="viewbox"></a>viewbox <em class="option">x,y x<sub>1</sub>,y<sub>1</sub></em></dt>
1055
1056 <dd></dd>
1057
1058</dl>
1059
1060</div>
1061
1062
cristy3eaa0ef2010-03-06 20:35:26 +00001063
1064</div>
1065
1066<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +00001067 <span id="linkbar-west">&nbsp;</span>
cristy3eaa0ef2010-03-06 20:35:26 +00001068 <span id="linkbar-center">
1069 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +00001070 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy3eaa0ef2010-03-06 20:35:26 +00001071 </span>
1072 <span id="linkbar-east">&nbsp;</span>
1073 </div>
1074 <div class="footer">
1075 <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>
1076 <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
1077 </div>
1078 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +00001079 <script type="text/javascript">
1080 var _gaq = _gaq || [];
1081 _gaq.push(['_setAccount', 'UA-17690367-1']);
1082 _gaq.push(['_trackPageview']);
1083
1084 (function() {
1085 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
1086 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
1087 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
1088 })();
1089 </script>
cristy3eaa0ef2010-03-06 20:35:26 +00001090</body>
1091</html>