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