blob: 1ff479e3f359739613adad829bc964f30011c008 [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>
cristy3c98a4f2010-08-13 20:09:41 +00005 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
6 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>
cristyffb69ed2010-12-25 00:06:48 +00007 <title>ImageMagick: Magick Vector Graphics</title>
cristy3ed852e2009-09-05 21:47:34 +00008 <meta http-equiv="Content-Language" content="en-US"/>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
10 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
cristy3c98a4f2010-08-13 20:09:41 +000011 <meta name="Application-name" content="ImageMagick"/>
cristyffb69ed2010-12-25 00:06:48 +000012 <meta name="Description" content="ImageMagick is a software suite to create, edit, or compose bitmap images in a variety of formats. Use ImageMagick to scale, rotate, shear, distort and transform images."/>
cristy3c98a4f2010-08-13 20:09:41 +000013 <meta name="Application-url" content="http://www.imagemagick.org"/>
cristy3ed852e2009-09-05 21:47:34 +000014 <meta name="Generator" content="PHP"/>
15 <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"/>
cristy3ed852e2009-09-05 21:47:34 +000016 <meta name="Rating" content="GENERAL"/>
17 <meta name="Robots" content="INDEX, FOLLOW"/>
18 <meta name="Generator" content="ImageMagick Studio LLC"/>
19 <meta name="Author" content="ImageMagick Studio LLC"/>
20 <meta name="Revisit-after" content="2 DAYS"/>
21 <meta name="Resource-type" content="document"/>
cristy7e41fe82010-12-04 23:12:08 +000022 <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
cristy3ed852e2009-09-05 21:47:34 +000023 <meta name="Distribution" content="Global"/>
cristy3c98a4f2010-08-13 20:09:41 +000024 <link rel="icon" href="../images/wand.png" sizes="32x32"/>
25 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"/>
26 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
27 <style type="text/css" media="all">
28 @import url("../www/magick.css");
29 </style>
cristy3eaa0ef2010-03-06 20:35:26 +000030</head>
31
32<body id="www-imagemagick-org">
33<div class="titlebar">
34<a href="../index.html">
35 <img src="../images/script.png" alt="[ImageMagick]"
36 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
37<a href="http://www.networkredux.com">
38 <img src="../images/networkredux.png" alt="[sponsor]"
39 style="margin: 45px auto; border: 0px; float: left;" /></a>
40<a href="http://www.imagemagick.org/discourse-server/">
41 <img src="../images/logo.jpg" alt=""
42 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
43<a href="../index.html">
44 <img src="../images/sprite.jpg" alt=""
45 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
46</div>
47
cristyce69bb02010-07-27 19:49:46 +000048<div class="westbar">
cristy3eaa0ef2010-03-06 20:35:26 +000049
cristy3ed852e2009-09-05 21:47:34 +000050<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000051 <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000052</div>
cristy3eaa0ef2010-03-06 20:35:26 +000053<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +000054<div class="menu">
cristybb503372010-05-27 20:51:26 +000055 <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
56</div>
57<div class="sub">
58 <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
59</div>
60<div class="sub">
61 <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
62</div>
63<div class="sub">
64 <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
65</div>
66<div class="sep"></div>
67<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000068 <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</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: Processing" href="../www/command-line-processing.html">Processing</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: Options" href="../www/command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +000075</div>
76<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000077 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +000078</div>
79<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000080 <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +000081</div>
82<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000083 <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +000084</div>
85<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000086 <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +000087</div>
88<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000089 <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000090</div>
91<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000092 <a title="Program Interface: Magick++" href="../Magick++/">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +000093</div>
cristy3eaa0ef2010-03-06 20:35:26 +000094<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +000095<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000096 <a title="Install from Source" href="../www/install-source.html">Install from Source</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: Unix" href="../www/install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +0000100</div>
101<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000102 <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000103 </div>
104<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000105 <a title="Resources" href="../www/resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000106</div>
cristybb503372010-05-27 20:51:26 +0000107<div class="menu">
108 <a title="Architecture" href="../www/architecture.html">Architecture</a>
109</div>
cristy3ed852e2009-09-05 21:47:34 +0000110<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000111 <a title="Download" href="../www/download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000112</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000113<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000114<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000115 <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000116</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000117<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000118<div class="menu">
cristyffb69ed2010-12-25 00:06:48 +0000119 <a title="Site Map" href="../www/sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000120</div>
121<div class="sub">
cristyffb69ed2010-12-25 00:06:48 +0000122 <a title="Site Map: Links" href="../www/links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000123</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000124<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000125<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000126 <a title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
cristy3ed852e2009-09-05 21:47:34 +0000127
128<div class="sponsbox">
129<div class="sponsor">
cristy61105362010-12-19 23:22:14 +0000130 <a title="Sponsor: Free Catalogs" href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 20120801000600 -->
cristy73fd1cd2010-09-12 19:14:25 +0000131</div>
132<div class="sponsor">
cristy7d52cd62010-10-01 17:26:59 +0000133 <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
134</div>
135<div class="sponsor">
cristyc5baf4f2010-08-31 15:05:33 +0000136 <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
137</div>
138<div class="sponsor">
cristy851dbce2010-08-06 21:40:00 +0000139 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
140</div>
141<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000142 <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
cristy37f02952010-03-24 19:47:41 +0000143</div>
144<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000145 <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
cristy8f900122010-03-05 15:26:31 +0000146</div>
147<div class="sponsor">
cristyc5baf4f2010-08-31 15:05:33 +0000148 <a title="Sponsor: Diamonds are a Girls Best Friend" href="http://www.schmuck.org">Diamonds are a Girls Best Friend</a><!-- 201101010600 Peterssen-->
cristy916e1922009-10-01 12:52:47 +0000149</div>
cristy3ed852e2009-09-05 21:47:34 +0000150</div>
151</div>
cristyce69bb02010-07-27 19:49:46 +0000152</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000153
cristyce69bb02010-07-27 19:49:46 +0000154<div class="eastbar">
155 <script type="text/javascript">
156 <!--
157 google_ad_client = "pub-3129977114552745";
cristyce69bb02010-07-27 19:49:46 +0000158 google_ad_slot = "0574824969";
159 google_ad_width = 160;
160 google_ad_height = 600;
161 //-->
162 </script>
163 <script type="text/javascript"
164 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
165 </script>
cristy3eaa0ef2010-03-06 20:35:26 +0000166</div>
167
168<div class="main">
169
170
cristyffb69ed2010-12-25 00:06:48 +0000171<h1>ImageMagick Magick Vector Graphics</h1>
cristy3ed852e2009-09-05 21:47:34 +0000172<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>
173
cristyffb69ed2010-12-25 00:06:48 +0000174<a name="intro"></a>
cristy3ed852e2009-09-05 21:47:34 +0000175<div class="doc-section">
176
177<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
178command 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>
179
180<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert -size 100x60 xc:skyblue -fill white -stroke black \ <br/>
181 -draw "path 'M 30,40 A 30,20 20 0,0 70,20 A 30,20 20 1,0 30,40 Z '" \ <br/>
182 arc.png</span></p>
183<p>and here is the result:</p>
184
185<p class="image">
186 <a href="../images/arc.png"><img src="../images/arc.png" width="100" height="60" alt="arc" /></a>
187</p>
188
189<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>
190
191<div class="viewport">
192<pre class="code">
193 push graphic-context
194 viewbox 0 0 624 369
195 affine 0.283636 0 0 0.283846 -0 -0
196 push graphic-context
197 push graphic-context
198 fill 'darkslateblue'
199 stroke 'blue'
200 stroke-width 1
201 rectangle 1,1 2199,1299
202 pop graphic-context
203 push graphic-context
204 font-size 40
205 fill 'white'
206 stroke-width 1
207 text 600,1100 'Average: 20.0'
208 pop graphic-context
209 push graphic-context
210 fill 'red'
211 stroke 'black'
212 stroke-width 5
213 path 'M700.0,600.0 L340.0,600.0 A360.0,360.0 0 0,1 408.1452123287954,389.2376150414973 z'
214 pop graphic-context
215 push graphic-context
216 font-size 40
217 fill 'white'
218 stroke-width 1
219 text 1400,140 'MagickWand for PHP'
220 pop graphic-context
221 push graphic-context
222 font-size 30
223 fill 'white'
224 stroke-width 1
225 text 1800,140 '(10.0%)'
226 pop graphic-context
227 push graphic-context
228 fill 'red'
229 stroke 'black'
230 stroke-width 4
231 rectangle 1330,100 1370,140
232 pop graphic-context
233 push graphic-context
234 fill 'yellow'
235 stroke 'black'
236 stroke-width 5
237 path 'M700.0,600.0 L408.1452123287954,389.2376150414973 A360.0,360.0 0 0,1 976.5894480359858,369.56936567559273 z'
238 pop graphic-context
239 push graphic-context
240 font-size 40
241 fill 'white'
242 stroke-width 1
243 text 1400,220 'MagickCore'
244 pop graphic-context
245 push graphic-context
246 font-size 30
247 fill 'white'
248 stroke-width 1
249 text 1800,220 '(29.0%)'
250 pop graphic-context
251 push graphic-context
252 fill 'yellow'
253 stroke 'black'
254 stroke-width 4
255 rectangle 1330,180 1370,220
256 pop graphic-context
257 push graphic-context
258 fill 'fuchsia'
259 stroke 'black'
260 stroke-width 5
261 path 'M700.0,600.0 L976.5894480359858,369.56936567559273 A360.0,360.0 0 0,1 964.2680466142854,844.4634932636567 z'
262 pop graphic-context
263 push graphic-context
264 font-size 40
265 fill 'white'
266 stroke-width 1
267 text 1400,300 'MagickWand'
268 pop graphic-context
269 push graphic-context
270 font-size 30
271 fill 'white'
272 stroke-width 1
273 text 1800,300 '(22.9%)'
274 pop graphic-context
275 push graphic-context
276 fill 'fuchsia'
277 stroke 'black'
278 stroke-width 4
279 rectangle 1330,260 1370,300
280 pop graphic-context
281 push graphic-context
282 fill 'blue'
283 stroke 'black'
284 stroke-width 5
285 path 'M700.0,600.0 L964.2680466142854,844.4634932636567 A360.0,360.0 0 0,1 757.853099990584,955.3210081341651 z'
286 pop graphic-context
287 push graphic-context
288 font-size 40
289 fill 'white'
290 stroke-width 1
291 text 1400,380 'JMagick'
292 pop graphic-context
293 push graphic-context
294 font-size 30
295 fill 'white'
296 stroke-width 1
297 text 1800,380 '(10.6%)'
298 pop graphic-context
299 push graphic-context
300 fill 'blue'
301 stroke 'black'
302 stroke-width 4
303 rectangle 1330,340 1370,380
304 pop graphic-context
305 push graphic-context
306 fill 'lime'
307 stroke 'black'
308 stroke-width 5
309 path 'M700.0,600.0 L757.853099990584,955.3210081341651 A360.0,360.0 0 0,1 340.0,600.0 z'
310 pop graphic-context
311 push graphic-context
312 font-size 40
313 fill 'white'
314 stroke-width 1
315 text 1400,460 'Magick++'
316 pop graphic-context
317 push graphic-context
318 font-size 30
319 fill 'white'
320 stroke-width 1
321 text 1800,460 '(27.5%)'
322 pop graphic-context
323 push graphic-context
324 fill 'lime'
325 stroke 'black'
326 stroke-width 4
327 rectangle 1330,420 1370,460
328 pop graphic-context
329 push graphic-context
330 font-size 100
331 fill 'white'
332 stroke-width 1
333 text 100,150 'ImageMagick'
334 pop graphic-context
335 push graphic-context
336 fill 'none'
337 stroke 'black'
338 stroke-width 5
339 circle 700,600 700,960
340 pop graphic-context
341 pop graphic-context
342 pop graphic-context
343</pre>
344</div>
345
346<p>to render a pie chart with this command:</p>
347
348<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert piechart.mvg piechart.png</span></p>
349<p>which produces this rendering:</p>
350
351<p class="image">
352 <a href="../images/piechart.png"><img src="../images/piechart.png" width="624" height="369" alt="piechart" /></a>
353</p>
354
355<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>
356
357<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert piechart.svg piechart.jpg</span></p>
358
359<p>to produce the same pie chart we created with the MVG language.</p>
360
361<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>
362
363<div class="viewport">
364<pre class="code">
365 (void) PushDrawingWand(draw_wand);
366 {
367 const PointInfo points[6] =
368 {
369 { 180,504 },
370 { 282.7,578.6 },
371 { 243.5,699.4 },
372 { 116.5,699.4 },
373 { 77.26,578.6 },
374 { 180,504 }
375 };
376
377 DrawSetStrokeAntialias(draw_wand,True);
378 DrawSetStrokeWidth(draw_wand,9);
379 DrawSetStrokeLineCap(draw_wand,RoundCap);
380 DrawSetStrokeLineJoin(draw_wand,RoundJoin);
381 (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
382 (void) PixelSetColor(color,"#4000c2");
383 DrawSetStrokeColor(draw_wand,color);
384 DrawSetFillRule(draw_wand,EvenOddRule);
385 (void) PixelSetColor(color,"#800000");
386 DrawSetFillColor(draw_wand,color);
387 DrawPolygon(draw_wand,6,points);
388 }
389 (void) PopDrawingWand(draw_wand);
390</pre>
391</div>
392
393</div>
394
395<h2><a name="overview"></a>MVG Overview</h2>
396<div class="doc-section">
397
398<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>
399
400<p>Metafile wrapper syntax (to support stand-alone MVG files):</p>
401
402<pre class="text">
403 push graphic-context
404 viewbox 0 0 width height
405 [ any other MVG commands ]
406 pop graphic-context
407</pre>
408
409<p>Pattern syntax (saving and restoring context):</p>
410
411<pre class="text">
412 push pattern id x,y width,height
413 push graphic-context
414 [ drawing commands ]
415 pop graphic-context
416 pop pattern
417</pre>
418
419<p>an example is (%s is a identifier string):</p>
420
421<pre class="text">
422 push defs
423 push pattern %s 10,10 20,20
424 push graphic-context
425 fill red
426 rectangle 5,5 15,15
427 pop graphic-context
428 push graphic-context
429 fill green
430 rectangle 10,10 20,20
431 pop graphic-context
432 pop pattern
433 pop defs
434</pre>
435
436<p>For image tiling use:</p>
437
438<pre class="text">
439 push pattern id x,y width,height
440 image Copy ...
441 pop pattern
442</pre>
443
444<p>Note you can use the pattern for either the fill or stroke like:</p>
445
446<pre class="text">
447 stroke url(#%s)
448</pre>
449
450<p>or</p>
451
452<pre class="text">
453 fill url(#%s)
454</pre>
455
456<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>
457
458<pre class="text">
459 push defs
460 push clip-path %s
461 push graphic-context
462 rectangle 10,10 20,20
463 pop graphic-context
464 pop clip-path
465 pop defs
466 clip-path url(#%s)
467</pre>
468
469</div>
470
471<h2><a name="primitives"></a>Drawing Primitives</h2>
472<div class="doc-section">
473
474<p>Here is a complete description of the MVG drawing primitives:</p>
475
476<dl class="doc">
477
478 <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>
479
480 <dd></dd>
481
482
483
484 <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>
485
486 <dd></dd>
487
488 <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>
489
490 <dd>
491 <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
492 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>
493 </dd>
494
495 <dt class="doc"><a name="border-color" id="border-color"></a>border-color <em class="option">color</em></dt>
496
497 <dd></dd>
498
499 <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>
500
501 <dd></dd>
502
503 <dt class="doc"><a name="clip-path" id="clip-path"></a>clip-path url(<em class="option">name</em>)</dt>
504
505 <dd></dd>
506
507 <dt class="doc"><a name="clip-rule" id="clip-rule"></a>clip-rule <em class="option">rule</em></dt>
508
509 <dd>Choose from these rule types:
510
511 <p class="text">
512 evenodd <br/>
513 nonzero
514 </p>
515 </dd>
516
517 <dt class="doc"><a name="clip-units" id="clip-units"></a>clip-units <em class="option">units</em></dt>
518
519 <dd>Choose from these unit types:
520
521 <p class="text">
522 userSpace <br/>
523 userSpaceOnUse <br/>
524 objectBoundingBox <br/>
525 </p>
526 </dd>
527
528 <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>
529
530
531
532
533
534
535
536
537
538
539
540<dd>Choose from these method types:
541
542<pre class="text">
543 point
544 replace
545 floodfill
546 filltoborder
547 reset
548</pre>
549
550</dd>
551
552 <dt class="doc"><a name="decorate" id="decorate"></a>decorate <em class="option">type</em></dt>
553
554
555<dd>Choose from these types of decorations:
556
557<pre class="text">
558 none
559 line-through
560 overline
561 underline
562</pre>
563
564</dd>
565
566 <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>
567
568 <dt class="doc"><a name="fill" id="fill"></a>fill <em class="option">color</em></dt>
569
570<dd>Choose from any of these <a href="../www/color.html">colors</a>.
571</dd>
572
573 <dt class="doc"><a name="fill-opacity" id="fill-opacity"></a>fill-opacity <em class="option">opacity</em></dt>
574
575
576<dd>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).
577</dd>
578
579 <dt class="doc"><a name="fill-rule" id="fill-rule"></a>fill-rule <em class="option">rule</em></dt>
580
581
582<dd>Choose from these rule types:
583
584<pre class="text">
585 evenodd
586 nonzero
587</pre>
588
589</dd>
590
591 <dt class="doc"><a name="font" id="font"></a>font <em class="option">name</em></dt>
592
593<dd></dd>
594
595 <dt class="doc"><a name="font-family" id="font-family"></a>font-family <em class="option">family</em></dt>
596
597<dd></dd>
598
599 <dt class="doc"><a name="font-size" id="font-size"></a>font-size <em class="option">point-size</em></dt>
600
601<dd></dd>
602
603 <dt class="doc"><a name="font-stretch" id="font-stretch"></a>font-stretch <em class="option">type</em></dt>
604
605<dd>Choose from these stretch types:
606
607<pre class="text">
608 all
609 normal
610 ultra-condensed
611 extra-condensed
612 condensed
613 semi-condensed
614 semi-expanded
615 expanded
616 extra-expanded
617 ultra-expanded
618</pre>
619
620</dd>
621
622 <dt class="doc"><a name="font-style" id="font-style"></a>font-style <em class="option">style</em></dt>
623
624
625<dd>Choose from these styles:
626
627<pre class="text">
628 all
629 normal
630 italic
631 oblique
632</pre>
633
634</dd>
635
636 <dt class="doc"><a name="font-weight" id="font-weight"></a>font-weight <em class="option">weight</em></dt>
637
638<dd>Choose from these weights:
639
640<pre class="text">
641 all
642 normal
643 bold
644 100
645 200
646 300
647 400
648 500
649 600
650 700
651 800
652 900
653</pre>
654
655</dd>
656
657 <dt class="doc"><a name="gradient-units" id="gradient-units"></a>gradient-units <em class="option">units</em></dt>
658
659<dd>Choose from these units:
660
661<pre class="text">
662 userSpace
663 userSpaceOnUse
664 objectBoundingBox
665</pre>
666
667</dd>
668
669 <dt class="doc"><a name="gravity" id="gravity"></a>gravity <em class="option">type</em></dt>
670
671<dd>Choose from these gravity types:
672
673<pre class="text">
674 NorthWest
675 North
676 NorthEast
677 West
678 Center
679 East
680 SouthWest
681 South
682 SouthEast
683</pre>
684
685</dd>
686
687 <dt class="doc"><a name="image" id="image"></a>image <em class="option">compose x,y width,height 'filename'</em></dt>
688
689<dd>Choose from these compose operations:
690
691<table id="table" cellpadding="2" cellspacing="0" style="width: 93%">
692 <tbody>
693 <tr valign="top">
694 <th align="left" style="width: 8%">Method</th>
695 <th align="left">Description</th>
696 </tr>
697
698 <tr valign="top">
699 <td valign="top">clear</td>
700 <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>
701 </tr>
702
703 <tr valign="top">
704 <td valign="top">src</td>
705 <td valign="top">The source is copied to the destination. The destination is not used as input.</td>
706 </tr>
707
708 <tr valign="top">
709 <td valign="top">dst</td>
710 <td valign="top">The destination is left untouched.</td>
711 </tr>
712
713 <tr valign="top">
714 <td valign="top"><b>src-over</b></td>
715 <td valign="top">The source is composited over the destination.</td>
716 </tr>
717
718 <tr valign="top">
719 <td valign="top">dst-over</td>
720 <td valign="top">The destination is composited over the source and the result replaces the destination.</td>
721 </tr>
722
723 <tr valign="top">
724 <td valign="top">src-in</td>
725 <td valign="top">The part of the source lying inside of the destination replaces the destination.</td>
726 </tr>
727
728 <tr valign="top">
729 <td valign="top">dst-in</td>
730 <td valign="top">The part of the destination lying inside of the source replaces the destination.</td>
731 </tr>
732
733 <tr valign="top">
734 <td valign="top">src-out</td>
735 <td valign="top">The part of the source lying outside of the destination replaces the destination.</td>
736 </tr>
737
738 <tr valign="top">
739 <td valign="top">dst-out</td>
740 <td valign="top">The part of the destination lying outside of the source replaces the destination.</td>
741 </tr>
742
743 <tr valign="top">
744 <td valign="top">src-atop</td>
745 <td valign="top">The part of the source lying inside of the destination is composited onto the destination.</td>
746 </tr>
747
748 <tr valign="top">
749 <td valign="top">dst-atop</td>
750 <td valign="top">The part of the destination lying inside of the source is composited over the source and replaces the destination.</td>
751 </tr>
752
753 <tr valign="top">
754 <td valign="top">multiply</td>
755 <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>
756 </tr>
757
758 <tr valign="top">
759 <td valign="top">screen</td>
760 <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>
761 </tr>
762
763 <tr valign="top">
764 <td valign="top">overlay</td>
765 <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>
766 </tr>
767
768 <tr valign="top">
769 <td valign="top">darken</td>
770 <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>
771 </tr>
772
773 <tr valign="top">
774 <td valign="top">lighten</td>
775 <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>
776 </tr>
777
778 <tr valign="top">
779 <td valign="top">linear-light</td>
780 <td valign="top">Increase contrast slightly with an impact on the foreground's tonal values.</td>
781 </tr>
782
783 <tr valign="top">
784 <td valign="top">color-dodge</td>
785 <td valign="top">Brightens the destination color to reflect the source color. Painting with black produces no change.</td>
786 </tr>
787
788 <tr valign="top">
789 <td valign="top">color-burn</td>
790 <td valign="top">Darkens the destination color to reflect the source color. Painting with white produces no change.</td>
791 </tr>
792
793 <tr valign="top">
794 <td valign="top">hard-light</td>
795 <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>
796 </tr>
797
798 <tr valign="top">
799 <td valign="top">soft-light</td>
800 <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>
801 </tr>
802
803 <tr valign="top">
804 <td valign="top">plus</td>
805 <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>
806 </tr>
807
808 <tr valign="top">
809 <td valign="top">add</td>
810 <td valign="top">As per 'plus' but transparency data is treated as matte
811 values. As such any transparent areas in either image remain
812 transparent. </td>
813 </tr>
814
815 <tr valign="top">
816 <td valign="top">minus</td>
817 <td valign="top">Subtract the colors in the source image from the
818 destination image. When transparency is involved, Opaque areas will be
819 subtracted from any destination opaque areas. </td>
820 </tr>
821
822 <tr valign="top">
823 <td valign="top">subtract</td>
824 <td valign="top">Subtract the colors in the source image from the
825 destination image. When transparency is involved transparent areas are
826 subtracted, so only the opaque areas in the source remain opaque in
827 the destination image. </td>
828 </tr>
829
830 <tr valign="top">
831 <td valign="top">difference</td>
832 <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>
833 </tr>
834
835 <tr valign="top">
836 <td valign="top">exclusion</td>
837 <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>
838 </tr>
839
840 <tr valign="top">
841 <td valign="top">xor</td>
842 <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>
843 </tr>
844
845 <tr valign="top">
846 <td valign="top">copy-*</td>
847 <td valign="top">Copy the specificed channel in the source image to the
848 same channel in the destination image. If the channel specified in
849 the source image does not exist, (which can only happen for methods,
850 '<kbd>copy-opacity</kbd>' or '<kbd>copy-black</kbd>') then it is
851 assumed that the source image is a special grayscale channel image
852 of the values to be copied. </td>
853 </tr>
854
855 <tr valign="top">
856 <td valign="top">change-mask</td>
857 <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>
858 </tr>
859 </tbody>
860</table>
861
862</dd>
863
cristyf3bb4782009-09-08 13:10:04 +0000864 <dt class="doc"><a name="interline-spacing" id="interline-spacing"></a>interline-spacing <em class="option">pixels</em></dt>
865
866 <dd></dd>
867
cristy3ed852e2009-09-05 21:47:34 +0000868 <dt class="doc"><a name="interword-spacing" id="interword-spacing"></a>interword-spacing <em class="option">pixels</em></dt>
869
870 <dd></dd>
871
872 <dt class="doc"><a name="kerning" id="kerning"></a>kerning <em class="option">pixels</em></dt>
873
874 <dd></dd>
875
876 <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>
877
878 <dd></dd>
879
880 <dt class="doc"><a name="matte" id="matte"></a>matte <em class="option">x,y method</em></dt>
881
882<dd>Choose from these methods:
883
884<pre class="text">
885 point
886 replace
887 floodfill
888 filltoborder
889 reset
890</pre>
891
892</dd>
893
894 <dt class="doc"><a name="offset" id="offset"></a>offset <em class="option">offset</em></dt>
895
896 <dd></dd>
897
898 <dt class="doc"><a name="opacity" id="opacity"></a>opacity <em class="option">opacity</em></dt>
899
900<dd>Use percent (e.g. 50%).</dd>
901
902 <dt class="doc"><a name="path" id="path"></a>path <em class="option">path</em></dt>
903
904 <dd></dd>
905
906 <dt class="doc"><a name="point" id="point"></a>point <em class="option">x,y</em></dt>
907
908 <dd></dd>
909
910 <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>
911
912 <dd></dd>
913
914 <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>
915
916 <dd></dd>
917
918 <dt class="doc"><a name="pop-clip-path" id="pop-clip-path"></a>pop clip-path</dt>
919
920 <dd></dd>
921
922 <dt class="doc"><a name="pop-defs" id="pop-defs"></a>pop defs</dt>
923
924 <dd></dd>
925
926 <dt class="doc"><a name="pop-gradient" id="pop-gradient"></a>pop gradient</dt>
927
928 <dd></dd>
929
930 <dt class="doc"><a name="pop-graphic-context" id="pop-graphic-context"></a>pop graphic-context</dt>
931
932 <dd></dd>
933
934 <dt class="doc"><a name="pop-pattern" id="pop-pattern"></a>pop pattern</dt>
935
936 <dd></dd>
937
938 <dt class="doc"><a name="push" id="push"></a>push clip-path <em class="option">name</em></dt>
939
940 <dd></dd>
941
942 <dt class="doc"><a name="push-defs" id="push-defs"></a>push defs</dt>
943
944 <dd></dd>
945
946 <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>
947
948 <dd></dd>
949
950 <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>
951
952 <dd></dd>
953
954 <dt class="doc"><a name="push-graphic-context" id="push-graphic-context"></a>push graphic-context</dt>
955
956 <dd></dd>
957
958 <dt class="doc"><a name="push-pattern" id="push-pattern"></a>push pattern <em class="option">id radial x,y width,height</em></dt>
959
960 <dd></dd>
961
962 <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>
963
964 <dd></dd>
965
966 <dt class="doc"><a name="rotate" id="rotate"></a>rotate <em class="option">angle</em></dt>
967
968 <dd></dd>
969
970 <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>
971
972 <dd></dd>
973
974 <dt class="doc"><a name="scale" id="scale"></a>scale <em class="option">x,y</em></dt>
975
976 <dd></dd>
977
978 <dt class="doc"><a name="skewX" id="skewX"></a>skewX <em class="option">angle</em></dt>
979
980 <dd></dd>
981
982 <dt class="doc"><a name="skewY" id="skewY"></a>skewX <em class="option">angle</em></dt>
983
984 <dd></dd>
985
986 <dt class="doc"><a name="stop-color" id="stop-color"></a>stop-color <em class="option">color offset</em></dt>
987
988 <dd></dd>
989
990 <dt class="doc"><a name="stroke" id="stroke"></a>stroke <em class="option">color</em></dt>
991
992 <dd></dd>
993
994 <dt class="doc"><a name="stroke-antialias" id="stroke-antialias"></a>stroke-antialias <em class="option">0 &bull; 1</em></dt>
995
996 <dd></dd>
997
998 <dt class="doc"><a name="stroke-dasharray" id="stroke-dasharray"></a>stroke-dasharray <em class="option">none &bull; numeric-list</em></dt>
999
1000 <dd></dd>
1001
1002 <dt class="doc"><a name="stroke-dashoffset" id="stroke-dashoffset"></a>stroke-dashoffset <em class="option">offset</em></dt>
1003
1004 <dd></dd>
1005
1006 <dt class="doc"><a name="stroke-linecap" id="stroke-linecap"></a>stroke-linecap <em class="option">type</em></dt>
1007
1008
1009 <dd>Choose from these cap types:
1010
1011<pre class="text">
1012 butt
1013 round
1014 square
1015</pre>
1016
1017 </dd>
1018
1019 <dt class="doc"><a name="stroke-linejoin" id="stroke-linejoin"></a>stroke-linejoin <em class="option">type</em></dt>
1020
1021 <dd>Choose from these join types:
1022
1023<pre class="text">
1024 bevel
1025 miter
1026 round
1027</pre>
1028
1029 </dd>
1030
1031 <dt class="doc"><a name="stroke-miterlimit" id="stroke-miterlimit"></a>stroke-miterlimit <em class="option">limit</em></dt>
1032
1033 <dd></dd>
1034
1035 <dt class="doc"><a name="stroke-opacity" id="stroke-opacity"></a>stroke-opacity <em class="option">opacity</em></dt>
1036
1037 <dd>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).
1038 </dd>
1039
1040 <dt class="doc"><a name="stroke-width" id="stroke-width"></a>stroke-width <em class="option">width</em></dt>
1041
1042 <dd></dd>
1043
1044 <dt class="doc"><a name="text" id="text"></a>text <em class="option">"text"</em></dt>
1045
1046 <dd></dd>
1047
1048 <dt class="doc"><a name="text-antialias" id="text-antialias"></a>text-antialias <em class="option">0 &bull; 1</em></dt>
1049
1050 <dd></dd>
1051
1052 <dt class="doc"><a name="text-undercolor" id="text-undercolor"></a>text-undercolor <em class="option">color</em></dt>
1053
1054 <dd></dd>
1055
1056 <dt class="doc"><a name="translate" id="translate"></a>translate <em class="option">x,y</em></dt>
1057
1058 <dd></dd>
1059
1060 <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>
1061
1062 <dd></dd>
1063
1064</dl>
1065
1066</div>
1067
1068
cristy3eaa0ef2010-03-06 20:35:26 +00001069
1070</div>
1071
1072<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +00001073 <span id="linkbar-west">&nbsp;</span>
cristy3eaa0ef2010-03-06 20:35:26 +00001074 <span id="linkbar-center">
1075 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +00001076 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy3eaa0ef2010-03-06 20:35:26 +00001077 </span>
1078 <span id="linkbar-east">&nbsp;</span>
1079 </div>
1080 <div class="footer">
cristy7e41fe82010-12-04 23:12:08 +00001081 <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>
cristy3eaa0ef2010-03-06 20:35:26 +00001082 <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
1083 </div>
1084 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +00001085 <script type="text/javascript">
1086 var _gaq = _gaq || [];
1087 _gaq.push(['_setAccount', 'UA-17690367-1']);
1088 _gaq.push(['_trackPageview']);
1089
1090 (function() {
1091 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
1092 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
1093 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
1094 })();
1095 </script>
cristy3eaa0ef2010-03-06 20:35:26 +00001096</body>
1097</html>