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