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