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, initial-scale=1" /> 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 digital 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, image processing software" /> 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="Create, Edit, Compose, or Convert Digital 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 bg-dark fixed-top"> 39 <div class="container-fluid"> 40 <a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a> 41 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#magick-navbars" aria-controls="magick-navbars" aria-expanded="false" aria-label="Toggle navigation"> 42 <span class="navbar-toggler-icon"></span> 43 </button> 44 45 <div class="collapse navbar-collapse" id="magick-navbars"> 46 <ul class="navbar-nav me-auto mb-2 mb-md-0"> 47 <li class="nav-item"> 48 <a class="nav-link " href="index.html">Home</a> 49 </li> 50 <li class="nav-item"> 51 <a class="nav-link " href="download.html">Download</a> 52 </li> 53 <li class="nav-item"> 54 <a class="nav-link " href="command-line-tools.html">Tools</a> 55 </li> 56 <li class="nav-item"> 57 <a class="nav-link " href="command-line-processing.html">CLI</a> 58 </li> 59 <li class="nav-item"> 60 <a class="nav-link " href="develop.html">Develop</a> 61 </li> 62 <li class="nav-item"> 63 <a class="nav-link" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a> 64 </li> 65 <li class="nav-item"> 66 <iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe> 67 </li> 68 </ul> 69 <form class="d-flex form-inline" action="../www/search.html"> 70 <input class="form-control me-2" type="text" name="q" placeholder="Search" aria-label="Search"> 71 <button class="btn btn-outline-success" type="submit" name="sa">Search</button> 72 </form> 73 </div> 74 </div> 75 </nav> 76 77 <div class="container"> 78 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> 79 <ins class="adsbygoogle" 80 style="display:block" 81 data-ad-client="ca-pub-3129977114552745" 82 data-ad-slot="6345125851" 83 data-full-width-responsive="true" 84 data-ad-format="horizontal"></ins> 85 <script> 86 (adsbygoogle = window.adsbygoogle || []).push({}); 87 </script> 88 89 </div> 90 91 <main class="container"> 92 <div class="magick-template"> 93<div class="magick-header"> 94<h1 class="text-center">Magick Vector Graphics</h1> 95<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> 96 97<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 98command 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="develop.html">program interfaces</a>. Use this command, for example, to render an arc:</p> 99 100<pre class="highlight"><code>magick -size 100x60 canvas:skyblue -fill white -stroke black \ 101 -draw "path 'M 30,40 A 30,20 20 0,0 70,20 A 30,20 20 1,0 30,40 Z '" \ 102 arc.png 103</code></pre> 104 105<p>and here is the result:</p> 106 107<ul> 108 <a href="../images/arc.png"><img src="../images/arc.png" width="100" height="60" alt="arc" /></a> 109</ul> 110 111<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> 112 113<pre class="pre-scrollable highlight"><code>push graphic-context 114 viewbox 0 0 624 369 115 affine 0.283636 0 0 0.283846 -0 -0 116 push graphic-context 117 push graphic-context 118 fill 'darkslateblue' 119 stroke 'blue' 120 stroke-width 1 121 rectangle 1,1 2199,1299 122 pop graphic-context 123 push graphic-context 124 font-size 40 125 fill 'white' 126 stroke-width 1 127 text 600,1100 'Average: 20.0' 128 pop graphic-context 129 push graphic-context 130 fill 'red' 131 stroke 'black' 132 stroke-width 5 133 path 'M700.0,600.0 L340.0,600.0 A360.0,360.0 0 0,1 408.1452123287954,389.2376150414973 z' 134 pop graphic-context 135 push graphic-context 136 font-size 40 137 fill 'white' 138 stroke-width 1 139 text 1400,140 'MagickWand for PHP' 140 pop graphic-context 141 push graphic-context 142 font-size 30 143 fill 'white' 144 stroke-width 1 145 text 1800,140 '(10.0%)' 146 pop graphic-context 147 push graphic-context 148 fill 'red' 149 stroke 'black' 150 stroke-width 4 151 rectangle 1330,100 1370,140 152 pop graphic-context 153 push graphic-context 154 fill 'yellow' 155 stroke 'black' 156 stroke-width 5 157 path 'M700.0,600.0 L408.1452123287954,389.2376150414973 A360.0,360.0 0 0,1 976.5894480359858,369.56936567559273 z' 158 pop graphic-context 159 push graphic-context 160 font-size 40 161 fill 'white' 162 stroke-width 1 163 text 1400,220 'MagickCore' 164 pop graphic-context 165 push graphic-context 166 font-size 30 167 fill 'white' 168 stroke-width 1 169 text 1800,220 '(29.0%)' 170 pop graphic-context 171 push graphic-context 172 fill 'yellow' 173 stroke 'black' 174 stroke-width 4 175 rectangle 1330,180 1370,220 176 pop graphic-context 177 push graphic-context 178 fill 'fuchsia' 179 stroke 'black' 180 stroke-width 5 181 path 'M700.0,600.0 L976.5894480359858,369.56936567559273 A360.0,360.0 0 0,1 964.2680466142854,844.4634932636567 z' 182 pop graphic-context 183 push graphic-context 184 font-size 40 185 fill 'white' 186 stroke-width 1 187 text 1400,300 'MagickWand' 188 pop graphic-context 189 push graphic-context 190 font-size 30 191 fill 'white' 192 stroke-width 1 193 text 1800,300 '(22.9%)' 194 pop graphic-context 195 push graphic-context 196 fill 'fuchsia' 197 stroke 'black' 198 stroke-width 4 199 rectangle 1330,260 1370,300 200 pop graphic-context 201 push graphic-context 202 fill 'blue' 203 stroke 'black' 204 stroke-width 5 205 path 'M700.0,600.0 L964.2680466142854,844.4634932636567 A360.0,360.0 0 0,1 757.853099990584,955.3210081341651 z' 206 pop graphic-context 207 push graphic-context 208 font-size 40 209 fill 'white' 210 stroke-width 1 211 text 1400,380 'JMagick' 212 pop graphic-context 213 push graphic-context 214 font-size 30 215 fill 'white' 216 stroke-width 1 217 text 1800,380 '(10.6%)' 218 pop graphic-context 219 push graphic-context 220 fill 'blue' 221 stroke 'black' 222 stroke-width 4 223 rectangle 1330,340 1370,380 224 pop graphic-context 225 push graphic-context 226 fill 'lime' 227 stroke 'black' 228 stroke-width 5 229 path 'M700.0,600.0 L757.853099990584,955.3210081341651 A360.0,360.0 0 0,1 340.0,600.0 z' 230 pop graphic-context 231 push graphic-context 232 font-size 40 233 fill 'white' 234 stroke-width 1 235 text 1400,460 'Magick++' 236 pop graphic-context 237 push graphic-context 238 font-size 30 239 fill 'white' 240 stroke-width 1 241 text 1800,460 '(27.5%)' 242 pop graphic-context 243 push graphic-context 244 fill 'lime' 245 stroke 'black' 246 stroke-width 4 247 rectangle 1330,420 1370,460 248 pop graphic-context 249 push graphic-context 250 font-size 100 251 fill 'white' 252 stroke-width 1 253 text 100,150 'ImageMagick' 254 pop graphic-context 255 push graphic-context 256 fill 'none' 257 stroke 'black' 258 stroke-width 5 259 circle 700,600 700,960 260 pop graphic-context 261 pop graphic-context 262pop graphic-context 263</code></pre> 264 265<p>to render a pie chart with this command:</p> 266 267<pre class="highlight"><code>magick mvg:piechart.mvg piechart.png 268</code></pre> 269 270<p>which produces this rendering:</p> 271 272<ul> 273 <a href="../images/piechart.png"><img src="../images/piechart.png" width="624" height="369" alt="piechart" /></a> 274</ul> 275 276<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> 277 278<pre class="highlight"><code>magick mvg:piechart.svg piechart.jpg 279</code></pre> 280 281 282<p>to produce the same pie chart we created with the MVG language.</p> 283 284<p>Drawing is available from many of the ImageMagick <a href="develop.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> 285 286<pre class="pre-scrollable highlight"><code>(void) PushDrawingWand(draw_wand); 287{ 288 const PointInfo points[6] = 289 { 290 { 180,504 }, 291 { 282.7,578.6 }, 292 { 243.5,699.4 }, 293 { 116.5,699.4 }, 294 { 77.26,578.6 }, 295 { 180,504 } 296 }; 297 298 DrawSetStrokeAntialias(draw_wand,True); 299 DrawSetStrokeWidth(draw_wand,9); 300 DrawSetStrokeLineCap(draw_wand,RoundCap); 301 DrawSetStrokeLineJoin(draw_wand,RoundJoin); 302 (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL); 303 (void) PixelSetColor(color,"#4000c2"); 304 DrawSetStrokeColor(draw_wand,color); 305 DrawSetFillRule(draw_wand,EvenOddRule); 306 (void) PixelSetColor(color,"#800000"); 307 DrawSetFillColor(draw_wand,color); 308 DrawPolygon(draw_wand,6,points); 309} 310(void) PopDrawingWand(draw_wand); 311</code></pre> 312 313<h2><a class="anchor" id="overview"></a>MVG Overview</h2> 314 315<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> 316 317<p>Metafile wrapper syntax (to support stand-alone MVG files):</p> 318 319<pre class="highlight"><code>push graphic-context 320 viewbox 0 0 width height 321 [ any other MVG commands ] 322pop graphic-context 323</code></pre> 324 325<p>Pattern syntax (saving and restoring context):</p> 326 327<pre class="highlight"><code>push pattern id x,y width,height 328 push graphic-context 329 [ drawing commands ] 330 pop graphic-context 331pop pattern 332</code></pre> 333 334<p>an example is (%s is a identifier string):</p> 335 336<pre class="highlight"><code>push defs 337 push pattern %s 10,10 20,20 338 push graphic-context 339 fill red 340 rectangle 5,5 15,15 341 pop graphic-context 342 push graphic-context 343 fill green 344 rectangle 10,10 20,20 345 pop graphic-context 346 pop pattern 347pop defs 348</code></pre> 349 350<p>For image tiling use:</p> 351 352<pre class="highlight"><code>push pattern id x,y width,height 353 image Copy ... 354pop pattern 355</code></pre> 356 357<p>Note you can use the pattern for either the fill or stroke like:</p> 358 359<pre class="highlight"><code>stroke url(#%s) 360</code></pre> 361 362<p>or</p> 363 364<pre class="highlight"><code>fill url(#%s) 365</code></pre> 366 367<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> 368 369<pre class="highlight"><code>push defs 370 push clip-path "myClipPath" 371 push graphic-context 372 rectangle 10,10 20,20 373 pop graphic-context 374 pop clip-path 375pop defs 376clip-path url(#myClipPath) 377</code></pre> 378 379<h2><a class="anchor" id="primitives"></a>Drawing Primitives</h2> 380 381<p>Here is a complete description of the MVG drawing primitives:</p> 382 383<div class="table-responsive" style="font-size:87.5% !important;"> 384<table class="table table-sm table-hover"> 385 <tr> 386 <th>Primitive</th> 387 <th>Description</th> 388 </tr> 389 <tr> 390 <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> 391 <td></td> 392 </tr> 393 <tr> 394 <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> 395 <td></td> 396 </tr> 397 <tr> 398 <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> 399 <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> 400 </tr> 401 <tr> 402 <td><a class="anchor" id="border-color"></a>border-color <var>color</var></td> 403 <td></td> 404 </tr> 405 <tr> 406 <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> 407 <td></td> 408 </tr> 409 <tr> 410 <td><a class="anchor" id="clip-path"></a>clip-path url(<var>name</var>)</td> 411 <td></td> 412 </tr> 413 <tr> 414 <td><a class="anchor" id="clip-rule"></a>clip-rule <var>rule</var></td> 415 <td>Choose from these rule types: 416<pre class="highlight"><code>evenodd 417nonzero</code></pre></td> 418 </tr> 419 <tr> 420 <td><a class="anchor" id="clip-units"></a>clip-units <var>units</var></td> 421 <td>Choose from these unit types: 422<pre class="highlight"><code>userSpace 423userSpaceOnUse 424objectBoundingBox</code></pre></td> 425 </tr> 426 <tr> 427 <td><a class="anchor" id="color"></a>color <var>x</var>,<var>y</var> <var>method</var></td> 428 <td>Choose from these method types: 429<pre class="highlight"><code>point 430replace 431floodfill 432filltoborder 433reset</code></pre></td> 434 </tr> 435 <tr> 436 <td><a class="anchor" id="compliance"></a>compliance <var>type</var></td> 437 <td>Choose from these compliance types: MVG or SVG</td> 438 </tr> 439 <tr> 440 <td><a class="anchor" id="decorate"></a>decorate <var>type</var></td> 441 <td>Choose from these types of decorations: 442<pre class="highlight"><code>none 443line-through 444overline 445underline</code></pre></td> 446 </tr> 447 <tr> 448 <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> 449 <td></td> 450 </tr> 451 <tr> 452 <td><a class="anchor" id="fill"></a>fill <var>color</var></td> 453 <td>Choose from any of these <a href="../www/color.html">colors</a>.</td> 454 </tr> 455 <tr> 456 <td><a class="anchor" id="fill-opacity"></a>fill-opacity <var>opacity</var></td> 457 <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td> 458 </tr> 459 <tr> 460 <td><a class="anchor" id="fill-rule"></a>fill-rule <var>rule</var></td> 461 <td>Choose from these rule types: 462<pre class="highlight"><code>evenodd 463nonzero</code></pre></td> 464 </tr> 465 <tr> 466 <td><a class="anchor" id="font"></a>font <var>name</var></td> 467 <td></td> 468 </tr> 469 <tr> 470 <td><a class="anchor" id="font-family"></a>font-family <var>family</var></td> 471 <td></td> 472 </tr> 473 <tr> 474 <td><a class="anchor" id="font-size"></a>font-size <var>point-size</var></td> 475 <td></td> 476 </tr> 477 <tr> 478 <td><a class="anchor" id="font-stretch"></a>font-stretch <var>type</var></td> 479 <td>Choose from these stretch types: 480<pre class="highlight"><code>all 481normal 482ultra-condensed 483extra-condensed 484condensed 485semi-condensed 486semi-expanded 487expanded 488extra-expanded 489ultra-expanded</code></pre></td> 490 </tr> 491 <tr> 492 <td><a class="anchor" id="font-style"></a>font-style <var>style</var></td> 493 <td>Choose from these styles: 494<pre class="highlight"><code>all 495normal 496italic 497oblique</code></pre></td> 498 </tr> 499 <tr> 500 <td><a class="anchor" id="font-weight"></a>font-weight <var>weight</var></td> 501 <td>Choose from these weights: 502<pre class="highlight"><code>all 503normal 504bold 505100 506200 507300 508400 509500 510600 511700 512800 513900</code></pre></td> 514 </tr> 515 <tr> 516 <td><a class="anchor" id="gradient-units"></a>gradient-units <var>units</var></td> 517 <td>Choose from these units: 518<pre class="highlight"><code>userSpace 519userSpaceOnUse 520objectBoundingBox</code></pre></td> 521 </tr> 522 <tr> 523 <td><a class="anchor" id="gravity"></a>gravity <var>type</var></td> 524 <td>Choose from these gravity types: 525<pre class="highlight"><code>NorthWest 526North 527NorthEast 528West 529Center 530East 531SouthWest 532South 533SouthEast</code></pre></td> 534 </tr> 535 <tr> 536 <td><a class="anchor" id="compose"></a>image <var>compose x,y width,height 'filename'</var></td> 537 <td>Choose from these compose operations: 538 <table id="table" cellpadding="2" cellspacing="0" style="width: 93%"> 539 <tbody> 540 <tr> 541 <th align="left" style="width: 8%">Method</th> 542 <th align="left">Description</th> 543 </tr> 544 545 <tr> 546 <td>clear</td> 547 <td>Both the color and the alpha of the destination are cleared. Neither the source nor the destination are used as input.</td> 548 </tr> 549 550 <tr> 551 <td>src</td> 552 <td>The source is copied to the destination. The destination is not used as input.</td> 553 </tr> 554 555 <tr> 556 <td>dst</td> 557 <td>The destination is left untouched.</td> 558 </tr> 559 560 <tr> 561 <td><b>src-over</b></td> 562 <td>The source is composited over the destination.</td> 563 </tr> 564 565 <tr> 566 <td>dst-over</td> 567 <td>The destination is composited over the source and the result replaces the destination.</td> 568 </tr> 569 570 <tr> 571 <td>src-in</td> 572 <td>The part of the source lying inside of the destination replaces the destination.</td> 573 </tr> 574 575 <tr> 576 <td>dst-in</td> 577 <td>The part of the destination lying inside of the source replaces the destination.</td> 578 </tr> 579 580 <tr> 581 <td>src-out</td> 582 <td>The part of the source lying outside of the destination replaces the destination.</td> 583 </tr> 584 585 <tr> 586 <td>dst-out</td> 587 <td>The part of the destination lying outside of the source replaces the destination.</td> 588 </tr> 589 590 <tr> 591 <td>src-atop</td> 592 <td>The part of the source lying inside of the destination is composited onto the destination.</td> 593 </tr> 594 595 <tr> 596 <td>dst-atop</td> 597 <td>The part of the destination lying inside of the source is composited over the source and replaces the destination.</td> 598 </tr> 599 600 <tr> 601 <td>multiply</td> 602 <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> 603 </tr> 604 605 <tr> 606 <td>screen</td> 607 <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> 608 </tr> 609 610 <tr> 611 <td>overlay</td> 612 <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> 613 </tr> 614 615 <tr> 616 <td>darken</td> 617 <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> 618 </tr> 619 620 <tr> 621 <td>lighten</td> 622 <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> 623 </tr> 624 625 <tr> 626 <td>linear-light</td> 627 <td>Increase contrast slightly with an impact on the foreground's tonal values.</td> 628 </tr> 629 630 <tr> 631 <td>color-dodge</td> 632 <td>Brightens the destination color to reflect the source color. Painting with black produces no change.</td> 633 </tr> 634 635 <tr> 636 <td>color-burn</td> 637 <td>Darkens the destination color to reflect the source color. Painting with white produces no change.</td> 638 </tr> 639 640 <tr> 641 <td>hard-light</td> 642 <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> 643 </tr> 644 645 <tr> 646 <td>soft-light</td> 647 <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> 648 </tr> 649 650 <tr> 651 <td>plus</td> 652 <td>The source is added to the destination and replaces the destination. This operator is useful for animating a dissolve between two images.</td> 653 </tr> 654 655 <tr> 656 <td>add</td> 657 <td>As per 'plus' but transparency data is treated as matte 658 values. As such any transparent areas in either image remain 659 transparent. </td> 660 </tr> 661 662 <tr> 663 <td>minus</td> 664 <td>Subtract the colors in the source image from the 665 destination image. When transparency is involved, Opaque areas will be 666 subtracted from any destination opaque areas. </td> 667 </tr> 668 669 <tr> 670 <td>subtract</td> 671 <td>Subtract the colors in the source image from the 672 destination image. When transparency is involved transparent areas are 673 subtracted, so only the opaque areas in the source remain opaque in 674 the destination image. </td> 675 </tr> 676 677 <tr> 678 <td>difference</td> 679 <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> 680 </tr> 681 682 <tr> 683 <td>exclusion</td> 684 <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> 685 </tr> 686 687 <tr> 688 <td>xor</td> 689 <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> 690 </tr> 691 692 <tr> 693 <td>copy-*</td> 694 <td>Copy the specified channel in the source image to the 695 same channel in the destination image. If the channel specified in 696 the source image does not exist, (which can only happen for methods, 697 '<code>copy-opacity</code>' or '<code>copy-black</code>') then it is 698 assumed that the source image is a special grayscale channel image 699 of the values to be copied. </td> 700 </tr> 701 702 <tr> 703 <td>change-mask</td> 704 <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> 705 </tr> 706 </tbody> 707</table></td> 708 </tr> 709 <tr> 710 <td><a class="anchor" id="interline-spacing"></a>interline-spacing <var>pixels</var></td> 711 <td></td> 712 </tr> 713 <tr> 714 <td><a class="anchor" id="interword-spacing"></a>interword-spacing <var>pixels</var></td> 715 <td></td> 716 </tr> 717 <tr> 718 <td><a class="anchor" id="kerning"></a>kerning <var>pixels</var></td> 719 <td></td> 720 </tr> 721 <tr> 722 <td><a class="anchor" id="line"></a>line <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td> 723 <td></td> 724 </tr> 725 <tr> 726 <td><a class="anchor" id="matte"></a>matte <var>x,y method</var></td> 727 <td>Choose from these methods: 728<pre class="highlight"><code>point 729replace 730floodfill 731filltoborder 732reset</code></pre></td> 733 </tr> 734 <tr> 735 <td><a class="anchor" id="offset"></a>offset <var>offset</var></td> 736 <td></td> 737 </tr> 738 <tr> 739 <td><a class="anchor" id="opacity"></a>opacity <var>opacity</var></td> 740 <td>Use percent (e.g. 50%).</td> 741 </tr> 742 <tr> 743 <td><a class="anchor" id="path"></a>path <var>path</var></td> 744 <td></td> 745 </tr> 746 <tr> 747 <td><a class="anchor" id="point"></a>point <var>x,y</var></td> 748 <td></td> 749 </tr> 750 <tr> 751 <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> 752 <td></td> 753 </tr> 754 <tr> 755 <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> 756 <td></td> 757 </tr> 758 <tr> 759 <td><a class="anchor" id="pop-clip-path"></a>pop clip-path</td> 760 <td></td> 761 </tr> 762 <tr> 763 <td><a class="anchor" id="pop-defs"></a>pop defs</td> 764 <td></td> 765 </tr> 766 <tr> 767 <td><a class="anchor" id="pop-gradient"></a>pop gradient</td> 768 <td></td> 769 </tr> 770 <tr> 771 <td><a class="anchor" id="pop-graphic-context"></a>pop graphic-context</td> 772 <td></td> 773 </tr> 774 <tr> 775 <td><a class="anchor" id="pop-pattern"></a>pop pattern</td> 776 <td></td> 777 </tr> 778 <tr> 779 <td><a class="anchor" id="push"></a>push clip-path "<var>name</var>"</td> 780 <td></td> 781 </tr> 782 <tr> 783 <td><a class="anchor" id="push-defs"></a>push defs</td> 784 <td></td> 785 </tr> 786 <tr> 787 <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> 788 <td></td> 789 </tr> 790 <tr> 791 <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> 792 <td></td> 793 </tr> 794 <tr> 795 <td><a class="anchor" id="push-graphic-context"></a>push graphic-context { "<var>id</var>" }</td> 796 <td>the <em>id</em> is optional</td> 797 </tr> 798 <tr> 799 <td><a class="anchor" id="push-pattern"></a>push pattern <var>id radial x,y width,height</var></td> 800 <td></td> 801 </tr> 802 <tr> 803 <td><a class="anchor" id="rectangle"></a>rectangle <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td> 804 <td></td> 805 </tr> 806 <tr> 807 <td><a class="anchor" id="rotate"></a>rotate <var>angle</var></td> 808 <td></td> 809 </tr> 810 <tr> 811 <td><a class="anchor" id="roundrectangle"></a>roundrectangle <var>x,y x<sub>1</sub>,y<sub>1</sub> width,height</var></td> 812 <td></td> 813 </tr> 814 <tr> 815 <td><a class="anchor" id="scale"></a>scale <var>x,y</var></td> 816 <td></td> 817 </tr> 818 <tr> 819 <td><a class="anchor" id="skewX"></a>skewX <var>angle</var></td> 820 <td></td> 821 </tr> 822 <tr> 823 <td><a class="anchor" id="skewY"></a>skewX <var>angle</var></td> 824 <td></td> 825 </tr> 826 <tr> 827 <td><a class="anchor" id="stop-color"></a>stop-color <var>color offset</var></td> 828 <td></td> 829 </tr> 830 <tr> 831 <td><a class="anchor" id="stroke"></a>stroke <var>color</var></td> 832 <td></td> 833 </tr> 834 <tr> 835 <td><a class="anchor" id="stroke-antialias"></a>stroke-antialias <var>0 • 1</var></td> 836 <td></td> 837 </tr> 838 <tr> 839 <td><a class="anchor" id="stroke-dasharray"></a>stroke-dasharray <var>none • numeric-list</var></td> 840 <td></td> 841 </tr> 842 <tr> 843 <td><a class="anchor" id="stroke-dashoffset"></a>stroke-dashoffset <var>offset</var></td> 844 <td></td> 845 </tr> 846 <tr> 847 <td><a class="anchor" id="stroke-linecap"></a>stroke-linecap <var>type</var></td> 848 <td>Choose from these cap types: 849<pre class="highlight"><code>butt 850round 851square</code></pre></td> 852 </tr> 853 <tr> 854 <td><a class="anchor" id="stroke-linejoin"></a>stroke-linejoin <var>type</var></td> 855 <td>Choose from these join types: 856<pre class="highlight"><code>bevel 857miter 858round</code></pre></td> 859 </tr> 860 <tr> 861 <td><a class="anchor" id="stroke-miterlimit"></a>stroke-miterlimit <var>limit</var></td> 862 <td></td> 863 </tr> 864 <tr> 865 <td><a class="anchor" id="stroke-opacity"></a>stroke-opacity <var>opacity</var></td> 866 <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td> 867 </tr> 868 <tr> 869 <td><a class="anchor" id="stroke-width"></a>stroke-width <var>width</var></td> 870 <td></td> 871 </tr> 872 <tr> 873 <td><a class="anchor" id="text"></a>text <var>"text"</var></td> 874 <td></td> 875 </tr> 876 <tr> 877 <td><a class="anchor" id="text-antialias"></a>text-antialias <var>0 • 1</var></td> 878 <td></td> 879 </tr> 880 <tr> 881 <td><a class="anchor" id="text-undercolor"></a>text-undercolor <var>color</var></td> 882 <td></td> 883 </tr> 884 <tr> 885 <td><a class="anchor" id="translate"></a>translate <var>x,y</var></td> 886 <td></td> 887 </tr> 888 <tr> 889 <td><a class="anchor" id="use"></a>use "<var>url(#id)</var>"</td> 890 <td></td> 891 </tr> 892 <tr> 893 <td><a class="anchor" id="viewbox"></a>viewbox <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td> 894 <td></td> 895 </tr> 896</table></div> 897</div> 898 </div> 899 </main><!-- /.container --> 900 <footer class="magick-footer"> 901 <div class="container-fluid"> 902 <a href="security-policy.html">Security</a> • 903 <a href="news.html">News</a> 904 905 <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> 906 907 <a href="links.html">Related</a> • 908 <a href="sitemap.html">Sitemap</a> 909 <br/> 910 <a href="support.html">Sponsor</a> • 911 <a href="cite.html">Cite</a> • 912 <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • 913 <a href="https://imagemagick.org/script/contact.php">Contact Us</a> 914 <br/> 915 <a href="https://github.com/imagemagick/imagemagick" target="_blank" rel="noopener" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 499.36" width="2%" height="2%" role="img" focusable="false"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z"/></svg></a> • 916 <a href="https://twitter.com/imagemagick" target="_blank" rel="noopener" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 416.32" width="2%" height="2%" role="img" focusable="false"><title>Twitter</title><path fill="currentColor" d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92"/></svg></a> 917 <br/> 918 <small>© 1999-2021 ImageMagick Studio LLC</small> 919 </div> 920 </footer> 921 922 <!-- Javascript assets --> 923 <script src="assets/magick.js" ></script> 924 </body> 925</html> 926<!-- Magick Cache 13th February 2021 13:10 -->