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