• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no"  />
10  <title>ImageMagick - Magick Vector Graphics</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, and convert bitmap images. Resize an image, crop it, change its shades and colors, add captions, and more." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magick, vector, graphics, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" />
16  <meta name="rating" content="GENERAL" />
17  <meta name="robots" content="INDEX, FOLLOW" />
18  <meta name="generator" content="ImageMagick Studio LLC" />
19  <meta name="author" content="ImageMagick Studio LLC" />
20  <meta name="revisit-after" content="2 DAYS" />
21  <meta name="resource-type" content="document" />
22  <meta name="copyright" content="Copyright (c) 1999-2020 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta property='og:url' content='../' />
26  <meta property='og:title' content='ImageMagick' />
27  <meta property='og:image' content='../images/logo.png' />
28  <meta property='og:type' content='website' />
29  <meta property='og:site_name' content='ImageMagick' />
30  <meta property='og:description' content="Convert, Edit, or Compose Bitmap Images" />
31  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
32  <link href="../www/magick-vector-graphics.html" rel="canonical" />
33  <link href="../images/wand.png" rel="icon" />
34  <link href="../images/wand.ico" rel="shortcut icon" />
35  <link href="assets/magick.css" rel="stylesheet" />
36</head>
37<body>
38  <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
39    <a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a>
40    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation">
41      <span class="navbar-toggler-icon"></span>
42    </button>
43
44    <div class="navbar-collapse collapse" id="navbarsMagick" style="">
45    <ul class="navbar-nav mr-auto">
46      <li class="nav-item ">
47        <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a>
48      </li>
49      <li class="nav-item ">
50        <a class="nav-link" href="download.html">Download</a>
51      </li>
52      <li class="nav-item ">
53        <a class="nav-link" href="command-line-tools.html">Tools</a>
54      </li>
55      <li class="nav-item ">
56        <a class="nav-link" href="command-line-processing.html">Command-line</a>
57      </li>
58      <li class="nav-item ">
59        <a class="nav-link" href="resources.html">Resources</a>
60      </li>
61      <li class="nav-item ">
62        <a class="nav-link" href="develop.html">Develop</a>
63      </li>
64      <li class="nav-item">
65        <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a>
66      </li>
67    </ul>
68    <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php">
69      <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
70      <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
71    </form>
72    </div>
73  </nav>
74  <div class="container">
75   <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
76         style="display:block"
77         data-ad-client="ca-pub-3129977114552745"
78         data-ad-slot="6345125851"
79         data-full-width-responsive="true"
80         data-ad-format="horizontal"></ins>
81    <script>
82      (adsbygoogle = window.adsbygoogle || []).push({});
83    </script>
84
85  </div>
86
87  <main class="container">
88    <div class="magick-template">
89<div class="magick-header">
90<p class="text-center"><a href="magick-vector-graphics.html#overview">MVG Overview</a> • <a href="magick-vector-graphics.html#primitives">Drawing Primitives</a></p>
91
92<p class="lead magick-description">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
93command 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>
94
95<pre class="highlight"><code>convert -size 100x60 canvas:skyblue -fill white -stroke black \
96  -draw "path 'M 30,40  A 30,20  20  0,0 70,20 A 30,20  20  1,0 30,40 Z '" \
97  arc.png
98</code></pre>
99
100<p>and here is the result:</p>
101
102<ul>
103  <a href="../images/arc.png"><img src="../images/arc.png" width="100" height="60" alt="arc" /></a>
104</ul>
105
106<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="https://imagemagick.org/source/piechart.mvg">piechart.mvg</a>:</p>
107
108<pre class="pre-scrollable"><code>push graphic-context
109  viewbox 0 0 624 369
110  affine 0.283636 0 0 0.283846 -0 -0
111  push graphic-context
112    push graphic-context
113      fill 'darkslateblue'
114      stroke 'blue'
115      stroke-width 1
116      rectangle 1,1 2199,1299
117    pop graphic-context
118    push graphic-context
119      font-size 40
120      fill 'white'
121      stroke-width 1
122      text 600,1100 'Average: 20.0'
123    pop graphic-context
124    push graphic-context
125      fill 'red'
126      stroke 'black'
127      stroke-width 5
128      path 'M700.0,600.0 L340.0,600.0 A360.0,360.0 0 0,1 408.1452123287954,389.2376150414973 z'
129    pop graphic-context
130    push graphic-context
131      font-size 40
132      fill 'white'
133      stroke-width 1
134      text 1400,140 'MagickWand for PHP'
135    pop graphic-context
136    push graphic-context
137      font-size 30
138      fill 'white'
139      stroke-width 1
140      text 1800,140 '(10.0%)'
141    pop graphic-context
142    push graphic-context
143      fill 'red'
144      stroke 'black'
145      stroke-width 4
146      rectangle 1330,100 1370,140
147    pop graphic-context
148    push graphic-context
149      fill 'yellow'
150      stroke 'black'
151      stroke-width 5
152      path 'M700.0,600.0 L408.1452123287954,389.2376150414973 A360.0,360.0 0 0,1 976.5894480359858,369.56936567559273 z'
153    pop graphic-context
154    push graphic-context
155      font-size 40
156      fill 'white'
157      stroke-width 1
158      text 1400,220 'MagickCore'
159    pop graphic-context
160    push graphic-context
161      font-size 30
162      fill 'white'
163      stroke-width 1
164      text 1800,220 '(29.0%)'
165    pop graphic-context
166    push graphic-context
167      fill 'yellow'
168      stroke 'black'
169      stroke-width 4
170      rectangle 1330,180 1370,220
171    pop graphic-context
172    push graphic-context
173      fill 'fuchsia'
174      stroke 'black'
175      stroke-width 5
176      path 'M700.0,600.0 L976.5894480359858,369.56936567559273 A360.0,360.0 0 0,1 964.2680466142854,844.4634932636567 z'
177    pop graphic-context
178    push graphic-context
179      font-size 40
180      fill 'white'
181      stroke-width 1
182      text 1400,300 'MagickWand'
183    pop graphic-context
184    push graphic-context
185      font-size 30
186      fill 'white'
187      stroke-width 1
188      text 1800,300 '(22.9%)'
189    pop graphic-context
190    push graphic-context
191      fill 'fuchsia'
192      stroke 'black'
193      stroke-width 4
194      rectangle 1330,260 1370,300
195    pop graphic-context
196    push graphic-context
197      fill 'blue'
198      stroke 'black'
199      stroke-width 5
200      path 'M700.0,600.0 L964.2680466142854,844.4634932636567 A360.0,360.0 0 0,1 757.853099990584,955.3210081341651 z'
201    pop graphic-context
202    push graphic-context
203      font-size 40
204      fill 'white'
205      stroke-width 1
206      text 1400,380 'JMagick'
207    pop graphic-context
208    push graphic-context
209      font-size 30
210      fill 'white'
211      stroke-width 1
212      text 1800,380 '(10.6%)'
213    pop graphic-context
214    push graphic-context
215      fill 'blue'
216      stroke 'black'
217      stroke-width 4
218      rectangle 1330,340 1370,380
219    pop graphic-context
220    push graphic-context
221      fill 'lime'
222      stroke 'black'
223      stroke-width 5
224      path 'M700.0,600.0 L757.853099990584,955.3210081341651 A360.0,360.0 0 0,1 340.0,600.0 z'
225    pop graphic-context
226    push graphic-context
227      font-size 40
228      fill 'white'
229      stroke-width 1
230      text 1400,460 'Magick++'
231    pop graphic-context
232    push graphic-context
233      font-size 30
234      fill 'white'
235      stroke-width 1
236      text 1800,460 '(27.5%)'
237    pop graphic-context
238    push graphic-context
239      fill 'lime'
240      stroke 'black'
241      stroke-width 4
242      rectangle 1330,420 1370,460
243    pop graphic-context
244    push graphic-context
245      font-size 100
246      fill 'white'
247      stroke-width 1
248      text 100,150 'ImageMagick'
249    pop graphic-context
250    push graphic-context
251      fill 'none'
252      stroke 'black'
253      stroke-width 5
254      circle 700,600 700,960
255    pop graphic-context
256  pop graphic-context
257pop graphic-context
258</code></pre>
259
260<p>to render a pie chart with this command:</p>
261
262<pre class="highlight"><code>convert mvg:piechart.mvg piechart.png
263</code></pre>
264
265<p>which produces this rendering:</p>
266
267<ul>
268  <a href="../images/piechart.png"><img src="../images/piechart.png" width="624" height="369" alt="piechart" /></a>
269</ul>
270
271<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="https://imagemagick.org/source/piechart.svg">piechart.svg</a> with this command:</p>
272
273<pre class="highlight"><code>convert mvg:piechart.svg piechart.jpg
274</code></pre>
275
276
277<p>to produce the same pie chart we created with the MVG language.</p>
278
279<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="magick-wand.html">MagickWand</a> language: </p>
280
281<pre class="pre-scrollable"><code>(void) PushDrawingWand(draw_wand);
282{
283  const PointInfo points[6] =
284  {
285    { 180,504 },
286    { 282.7,578.6 },
287    { 243.5,699.4 },
288    { 116.5,699.4 },
289    { 77.26,578.6 },
290    { 180,504 }
291  };
292
293  DrawSetStrokeAntialias(draw_wand,True);
294  DrawSetStrokeWidth(draw_wand,9);
295  DrawSetStrokeLineCap(draw_wand,RoundCap);
296  DrawSetStrokeLineJoin(draw_wand,RoundJoin);
297  (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
298  (void) PixelSetColor(color,"#4000c2");
299  DrawSetStrokeColor(draw_wand,color);
300  DrawSetFillRule(draw_wand,EvenOddRule);
301  (void) PixelSetColor(color,"#800000");
302  DrawSetFillColor(draw_wand,color);
303  DrawPolygon(draw_wand,6,points);
304}
305(void) PopDrawingWand(draw_wand);
306</code></pre>
307
308<h2><a class="anchor" id="overview"></a>MVG Overview</h2>
309
310<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 newline 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>
311
312<p>Metafile wrapper syntax (to support stand-alone MVG files):</p>
313
314<pre class="highlight"><code>push graphic-context
315  viewbox 0 0 width height
316  [ any other MVG commands ]
317pop graphic-context
318</code></pre>
319
320<p>Pattern syntax (saving and restoring context):</p>
321
322<pre class="highlight"><code>push pattern id x,y width,height
323 push graphic-context
324  [ drawing commands ]
325 pop graphic-context
326pop pattern
327</code></pre>
328
329<p>an example is (%s is a identifier string):</p>
330
331<pre class="highlight"><code>push defs
332 push pattern %s 10,10 20,20
333  push graphic-context
334   fill red
335   rectangle 5,5 15,15
336  pop graphic-context
337  push graphic-context
338   fill green
339   rectangle 10,10 20,20
340  pop graphic-context
341 pop pattern
342pop defs
343</code></pre>
344
345<p>For image tiling use:</p>
346
347<pre class="highlight"><code>push pattern id x,y width,height
348 image Copy ...
349pop pattern
350</code></pre>
351
352<p>Note you can use the pattern for either the fill or stroke like:</p>
353
354<pre class="highlight"><code>stroke url(#%s)
355</code></pre>
356
357<p>or</p>
358
359<pre class="highlight"><code>fill url(#%s)
360</code></pre>
361
362<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>
363
364<pre class="highlight"><code>push defs
365 push clip-path "myClipPath"
366  push graphic-context
367   rectangle 10,10 20,20
368  pop graphic-context
369 pop clip-path
370pop defs
371clip-path url(#myClipPath)
372</code></pre>
373
374<h2><a class="anchor" id="primitives"></a>Drawing Primitives</h2>
375
376<p>Here is a complete description of the MVG drawing primitives:</p>
377
378<div class="table-responsive" style="font-size:87.5% !important;">
379<table class="table table-sm table-striped">
380  <tr>
381    <th>Primitive</th>
382    <th>Description</th>
383  </tr>
384  <tr>
385    <td><a class="anchor" id="affine"></a>affine <var>s<sub>x</sub></var>,<var>r<sub>x</sub></var>,<var>r<sub>y</sub></var>,<var>s<sub>y</sub></var>,<var>t<sub>x</sub></var>,<var>t<sub>y</sub></var></td>
386    <td></td>
387  </tr>
388  <tr>
389    <td><a class="anchor" id="arc"></a>arc <var>x<sub>0</sub></var>,<var>y<sub>0</sub></var>   <var>x<sub>1</sub></var>,<var>y<sub>1</sub></var>   <var>a<sub>0</sub></var>,<var>a<sub>1</sub></var></td>
390    <td></td>
391  </tr>
392  <tr>
393    <td><a class="anchor" id="bezier"></a>bezier <var>x<sub>0</sub></var>,<var>y<sub>0</sub></var> ... <var>x<sub>n</sub></var>,<var>y<sub>n</sub></var></td>
394    <td><code>Bezier</code> (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 draw complex curves, it is highly recommended either to use the <code>Path</code> primitive or to draw multiple four-point bezier segments with the start and end knots of each successive segment repeated. </td>
395  </tr>
396  <tr>
397    <td><a class="anchor" id="border-color"></a>border-color <var>color</var></td>
398    <td></td>
399  </tr>
400  <tr>
401    <td><a class="anchor" id="circle"></a>circle <var>origin<sub>x</sub></var>,<var>origin<sub>y</sub></var>   <var>perimeter<sub>x</sub></var>,<var>perimeter<sub>y</sub></var></td>
402    <td></td>
403  </tr>
404  <tr>
405    <td><a class="anchor" id="clip-path"></a>clip-path url(<var>name</var>)</td>
406    <td></td>
407  </tr>
408  <tr>
409    <td><a class="anchor" id="clip-rule"></a>clip-rule <var>rule</var></td>
410    <td>Choose from these rule types:
411<pre class="highlight"><code>evenodd
412nonzero</code></pre></td>
413  </tr>
414  <tr>
415    <td><a class="anchor" id="clip-units"></a>clip-units <var>units</var></td>
416    <td>Choose from these unit types:
417<pre class="highlight"><code>userSpace
418userSpaceOnUse
419objectBoundingBox</code></pre></td>
420  </tr>
421  <tr>
422    <td><a class="anchor" id="color"></a>color <var>x</var>,<var>y</var> <var>method</var></td>
423    <td>Choose from these method types:
424<pre class="highlight"><code>point
425replace
426floodfill
427filltoborder
428reset</code></pre></td>
429  </tr>
430  <tr>
431    <td><a class="anchor" id="compliance"></a>compliance <var>type</var></td>
432    <td>Choose from these compliance types: MVG or SVG</td>
433  </tr>
434  <tr>
435    <td><a class="anchor" id="decorate"></a>decorate <var>type</var></td>
436    <td>Choose from these types of decorations:
437<pre class="highlight"><code>none
438line-through
439overline
440underline</code></pre></td>
441  </tr>
442  <tr>
443    <td><a class="anchor" id="ellipse"></a>ellipse <var>center<sub>x</sub></var>,<var>center<sub>y</sub></var>   <var>radius<sub>x</sub></var>,<var>radius<sub>y</sub></var>   <var>arc<sub>start</sub></var>,<var>arc<sub>stop</sub></var></td>
444    <td></td>
445  </tr>
446  <tr>
447    <td><a class="anchor" id="fill"></a>fill <var>color</var></td>
448    <td>Choose from any of these <a href="color.html">colors</a>.</td>
449  </tr>
450  <tr>
451    <td><a class="anchor" id="fill-opacity"></a>fill-opacity <var>opacity</var></td>
452    <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td>
453  </tr>
454  <tr>
455    <td><a class="anchor" id="fill-rule"></a>fill-rule <var>rule</var></td>
456    <td>Choose from these rule types:
457<pre class="highlight"><code>evenodd
458nonzero</code></pre></td>
459  </tr>
460  <tr>
461    <td><a class="anchor" id="font"></a>font <var>name</var></td>
462    <td></td>
463  </tr>
464  <tr>
465    <td><a class="anchor" id="font-family"></a>font-family <var>family</var></td>
466    <td></td>
467  </tr>
468  <tr>
469    <td><a class="anchor" id="font-size"></a>font-size <var>point-size</var></td>
470    <td></td>
471  </tr>
472  <tr>
473    <td><a class="anchor" id="font-stretch"></a>font-stretch <var>type</var></td>
474    <td>Choose from these stretch types:
475<pre class="highlight"><code>all
476normal
477ultra-condensed
478extra-condensed
479condensed
480semi-condensed
481semi-expanded
482expanded
483extra-expanded
484ultra-expanded</code></pre></td>
485  </tr>
486  <tr>
487    <td><a class="anchor" id="font-style"></a>font-style <var>style</var></td>
488    <td>Choose from these styles:
489<pre class="highlight"><code>all
490normal
491italic
492oblique</code></pre></td>
493  </tr>
494  <tr>
495    <td><a class="anchor" id="font-weight"></a>font-weight <var>weight</var></td>
496    <td>Choose from these weights:
497<pre class="highlight"><code>all
498normal
499bold
500100
501200
502300
503400
504500
505600
506700
507800
508900</code></pre></td>
509  </tr>
510  <tr>
511    <td><a class="anchor" id="gradient-units"></a>gradient-units <var>units</var></td>
512    <td>Choose from these units:
513<pre class="highlight"><code>userSpace
514userSpaceOnUse
515objectBoundingBox</code></pre></td>
516  </tr>
517  <tr>
518    <td><a class="anchor" id="gravity"></a>gravity <var>type</var></td>
519    <td>Choose from these gravity types:
520<pre class="highlight"><code>NorthWest
521North
522NorthEast
523West
524Center
525East
526SouthWest
527South
528SouthEast</code></pre></td>
529  </tr>
530  <tr>
531    <td><a class="anchor" id="compose"></a>image <var>compose x,y width,height 'filename'</var></td>
532    <td>Choose from these compose operations:
533    <table id="table" cellpadding="2" cellspacing="0" style="width: 93%">
534  <tbody>
535  <tr>
536    <th align="left" style="width: 8%">Method</th>
537    <th align="left">Description</th>
538  </tr>
539
540  <tr>
541    <td>clear</td>
542    <td>Both the color and the alpha of the destination are cleared. Neither the source nor the destination are used as input.</td>
543  </tr>
544
545  <tr>
546    <td>src</td>
547    <td>The source is copied to the destination. The destination is not used as input.</td>
548  </tr>
549
550  <tr>
551    <td>dst</td>
552    <td>The destination is left untouched.</td>
553  </tr>
554
555  <tr>
556    <td><b>src-over</b></td>
557    <td>The source is composited over the destination.</td>
558  </tr>
559
560  <tr>
561    <td>dst-over</td>
562    <td>The destination is composited over the source and the result replaces the destination.</td>
563  </tr>
564
565  <tr>
566    <td>src-in</td>
567    <td>The part of the source lying inside of the destination replaces the destination.</td>
568  </tr>
569
570  <tr>
571    <td>dst-in</td>
572    <td>The part of the destination lying inside of the source replaces the destination.</td>
573  </tr>
574
575  <tr>
576    <td>src-out</td>
577    <td>The part of the source lying outside of the destination replaces the destination.</td>
578  </tr>
579
580  <tr>
581    <td>dst-out</td>
582    <td>The part of the destination lying outside of the source         replaces the destination.</td>
583  </tr>
584
585  <tr>
586    <td>src-atop</td>
587    <td>The part of the source lying inside of the destination is  composited onto the destination.</td>
588  </tr>
589
590  <tr>
591    <td>dst-atop</td>
592    <td>The part of the destination lying inside of the source is composited over the source and replaces the destination.</td>
593  </tr>
594
595  <tr>
596    <td>multiply</td>
597    <td>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>
598  </tr>
599
600  <tr>
601    <td>screen</td>
602    <td>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>
603  </tr>
604
605  <tr>
606    <td>overlay</td>
607    <td>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>
608  </tr>
609
610  <tr>
611    <td>darken</td>
612    <td>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>
613  </tr>
614
615  <tr>
616    <td>lighten</td>
617    <td>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>
618  </tr>
619
620  <tr>
621    <td>linear-light</td>
622    <td>Increase contrast slightly with an impact on the foreground's tonal values.</td>
623  </tr>
624
625  <tr>
626    <td>color-dodge</td>
627    <td>Brightens the destination color to reflect the source color. Painting with black produces no change.</td>
628  </tr>
629
630  <tr>
631    <td>color-burn</td>
632    <td>Darkens the destination color to reflect the source color.  Painting with white produces no change.</td>
633  </tr>
634
635  <tr>
636    <td>hard-light</td>
637    <td>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>
638  </tr>
639
640  <tr>
641    <td>soft-light</td>
642    <td>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>
643  </tr>
644
645  <tr>
646    <td>plus</td>
647    <td>The source is added to the destination and replaces the destination. This operator is useful for animating a dissolve between two images.</td>
648  </tr>
649
650  <tr>
651    <td>add</td>
652    <td>As per 'plus' but transparency data is treated as matte
653        values. As such any transparent areas in either image remain
654        transparent. </td>
655  </tr>
656
657  <tr>
658    <td>minus</td>
659    <td>Subtract the colors in the source image from the
660        destination image. When transparency is involved, Opaque areas will be
661        subtracted from any destination opaque areas. </td>
662  </tr>
663
664  <tr>
665    <td>subtract</td>
666    <td>Subtract the colors in the source image from the
667        destination image. When transparency is involved transparent areas are
668        subtracted, so only the opaque areas in the source remain opaque in
669        the destination image. </td>
670  </tr>
671
672  <tr>
673    <td>difference</td>
674    <td>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>
675  </tr>
676
677  <tr>
678    <td>exclusion</td>
679    <td>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>
680  </tr>
681
682  <tr>
683    <td>xor</td>
684    <td>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>
685  </tr>
686
687  <tr>
688    <td>copy-*</td>
689    <td>Copy the specified channel in the source image to the
690        same channel in the destination image.  If the channel specified in
691        the source image does not exist, (which can only happen for methods,
692        '<code>copy-opacity</code>' or '<code>copy-black</code>') then it is
693        assumed that the source image is a special grayscale channel image
694        of the values to be copied. </td>
695    </tr>
696
697  <tr>
698    <td>change-mask</td>
699    <td>Replace any destination pixel that is the similar to the source images pixel (as defined by the current <a href="magick-vector-graphics.html#fuzz">-fuzz</a> factor), with transparency. </td>
700  </tr>
701  </tbody>
702</table></td>
703  </tr>
704  <tr>
705    <td><a class="anchor" id="interline-spacing"></a>interline-spacing <var>pixels</var></td>
706    <td></td>
707  </tr>
708  <tr>
709    <td><a class="anchor" id="interword-spacing"></a>interword-spacing <var>pixels</var></td>
710    <td></td>
711  </tr>
712  <tr>
713    <td><a class="anchor" id="kerning"></a>kerning <var>pixels</var></td>
714    <td></td>
715  </tr>
716  <tr>
717    <td><a class="anchor" id="line"></a>line <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
718    <td></td>
719  </tr>
720  <tr>
721    <td><a class="anchor" id="matte"></a>matte <var>x,y method</var></td>
722    <td>Choose from these methods:
723<pre class="highlight"><code>point
724replace
725floodfill
726filltoborder
727reset</code></pre></td>
728  </tr>
729  <tr>
730    <td><a class="anchor" id="offset"></a>offset <var>offset</var></td>
731    <td></td>
732  </tr>
733  <tr>
734    <td><a class="anchor" id="opacity"></a>opacity <var>opacity</var></td>
735    <td>Use percent (e.g. 50%).</td>
736  </tr>
737  <tr>
738    <td><a class="anchor" id="path"></a>path <var>path</var></td>
739    <td></td>
740  </tr>
741  <tr>
742    <td><a class="anchor" id="point"></a>point <var>x,y</var></td>
743    <td></td>
744  </tr>
745  <tr>
746    <td><a class="anchor" id="polygon"></a>polygon <var>x,y x<sub>1</sub>,y<sub>1</sub>, ..., x<sub>n</sub>,y<sub>n</sub></var></td>
747    <td></td>
748  </tr>
749  <tr>
750    <td><a class="anchor" id="polyline"></a>polyline <var>x,y x<sub>1</sub>,y<sub>1</sub>, ..., x<sub>n</sub>,y<sub>n</sub></var></td>
751    <td></td>
752  </tr>
753  <tr>
754    <td><a class="anchor" id="pop-clip-path"></a>pop clip-path</td>
755    <td></td>
756  </tr>
757  <tr>
758    <td><a class="anchor" id="pop-defs"></a>pop defs</td>
759    <td></td>
760  </tr>
761  <tr>
762    <td><a class="anchor" id="pop-gradient"></a>pop gradient</td>
763    <td></td>
764  </tr>
765  <tr>
766    <td><a class="anchor" id="pop-graphic-context"></a>pop graphic-context</td>
767    <td></td>
768  </tr>
769  <tr>
770    <td><a class="anchor" id="pop-pattern"></a>pop pattern</td>
771    <td></td>
772  </tr>
773  <tr>
774    <td><a class="anchor" id="push"></a>push clip-path "<var>name</var>"</td>
775    <td></td>
776  </tr>
777  <tr>
778    <td><a class="anchor" id="push-defs"></a>push defs</td>
779    <td></td>
780  </tr>
781  <tr>
782    <td><a class="anchor" id="push-gradient-linear"></a>push gradient <var>id linear x,y x<sub>1</sub>,y<sub>1</sub></var></td>
783    <td></td>
784  </tr>
785  <tr>
786    <td><a class="anchor" id="push-gradient-radial"></a>push gradient <var>id radial x<sub>c</sub>,c<sub>y</sub> x<sub>f</sub>,y<sub>f</sub> radius</var></td>
787    <td></td>
788  </tr>
789  <tr>
790    <td><a class="anchor" id="push-graphic-context"></a>push graphic-context { "<var>id</var>" }</td>
791    <td>the <em>id</em> is optional</td>
792  </tr>
793  <tr>
794    <td><a class="anchor" id="push-pattern"></a>push pattern <var>id radial x,y width,height</var></td>
795    <td></td>
796  </tr>
797  <tr>
798    <td><a class="anchor" id="rectangle"></a>rectangle <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
799    <td></td>
800  </tr>
801  <tr>
802    <td><a class="anchor" id="rotate"></a>rotate <var>angle</var></td>
803    <td></td>
804  </tr>
805  <tr>
806    <td><a class="anchor" id="roundrectangle"></a>roundrectangle <var>x,y x<sub>1</sub>,y<sub>1</sub> width,height</var></td>
807    <td></td>
808  </tr>
809  <tr>
810    <td><a class="anchor" id="scale"></a>scale <var>x,y</var></td>
811    <td></td>
812  </tr>
813  <tr>
814    <td><a class="anchor" id="skewX"></a>skewX <var>angle</var></td>
815    <td></td>
816  </tr>
817  <tr>
818    <td><a class="anchor" id="skewY"></a>skewX <var>angle</var></td>
819    <td></td>
820  </tr>
821  <tr>
822    <td><a class="anchor" id="stop-color"></a>stop-color <var>color offset</var></td>
823    <td></td>
824  </tr>
825  <tr>
826    <td><a class="anchor" id="stroke"></a>stroke <var>color</var></td>
827    <td></td>
828  </tr>
829  <tr>
830    <td><a class="anchor" id="stroke-antialias"></a>stroke-antialias <var>0 • 1</var></td>
831    <td></td>
832  </tr>
833  <tr>
834    <td><a class="anchor" id="stroke-dasharray"></a>stroke-dasharray <var>none • numeric-list</var></td>
835    <td></td>
836  </tr>
837  <tr>
838    <td><a class="anchor" id="stroke-dashoffset"></a>stroke-dashoffset <var>offset</var></td>
839    <td></td>
840  </tr>
841  <tr>
842    <td><a class="anchor" id="stroke-linecap"></a>stroke-linecap <var>type</var></td>
843    <td>Choose from these cap types:
844<pre class="highlight"><code>butt
845round
846square</code></pre></td>
847  </tr>
848  <tr>
849    <td><a class="anchor" id="stroke-linejoin"></a>stroke-linejoin <var>type</var></td>
850    <td>Choose from these join types:
851<pre class="highlight"><code>bevel
852miter
853round</code></pre></td>
854  </tr>
855  <tr>
856    <td><a class="anchor" id="stroke-miterlimit"></a>stroke-miterlimit <var>limit</var></td>
857    <td></td>
858  </tr>
859  <tr>
860    <td><a class="anchor" id="stroke-opacity"></a>stroke-opacity <var>opacity</var></td>
861    <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td>
862  </tr>
863  <tr>
864    <td><a class="anchor" id="stroke-width"></a>stroke-width <var>width</var></td>
865    <td></td>
866  </tr>
867  <tr>
868    <td><a class="anchor" id="text"></a>text <var>"text"</var></td>
869    <td></td>
870  </tr>
871  <tr>
872    <td><a class="anchor" id="text-antialias"></a>text-antialias <var>0 • 1</var></td>
873    <td></td>
874  </tr>
875  <tr>
876    <td><a class="anchor" id="text-undercolor"></a>text-undercolor <var>color</var></td>
877    <td></td>
878  </tr>
879  <tr>
880    <td><a class="anchor" id="translate"></a>translate <var>x,y</var></td>
881    <td></td>
882  </tr>
883  <tr>
884    <td><a class="anchor" id="use"></a>use "<var>url(#id)</var>"</td>
885    <td></td>
886  </tr>
887  <tr>
888    <td><a class="anchor" id="viewbox"></a>viewbox <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
889    <td></td>
890  </tr>
891</table></div>
892</div>
893    </div>
894  </main><!-- /.container -->
895  <footer class="magick-footer">
896    <p><a href="security-policy.html">Security</a> •
897    <a href="architecture.html">Architecture</a>
898
899    <a href="magick-vector-graphics.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico"/></a>
900
901    <a href="links.html">Related</a> •
902     <a href="sitemap.html">Sitemap</a>
903    <br/>
904    <a href="support.html">Donate</a> •
905    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
906    <a href="https://imagemagick.org/script/contact.php">Contact Us</a>
907    <br/>
908    <small>© 1999-2020 ImageMagick Studio LLC</small></p>
909  </footer>
910
911  <!-- Javascript assets -->
912  <script src="assets/magick.js" crossorigin="anonymous"></script>
913  <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.4.1/jquery.min.js"><\/script>')</script>
914</body>
915</html>
916<!-- Magick Cache 5th January 2020 10:32 -->