Debian Codegraph @

www/magick-vector-graphics/index.html

raw symbols ◀ ▶ SCIP
2 Debian patches touch this file
1
2
3 <!DOCTYPE html>
4 <html lang="en" data-bs-theme="dark">
5
6
7 <head>
•8 <meta charset="utf-8" />
9 <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
10 <title>ImageMagick | Magick Vector Graphics</title>
•11 <meta name="description" content="Master vector designs with Magick Vector Graphics (MVG) on ImageMagick." />
12 <link rel="canonical" href="index.html" />
13 <meta name="robots" content="index, follow" />
14 <meta name="theme-color" content="#000000" />
15 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
•16 <link rel="shortcut icon" href="../image/wand.png" type="image/png" />
17 <link rel="apple-touch-icon" href="../image/wand.png" type="image/png" />
18 <link rel="preconnect" href="https://localhost/" />
19 <link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" as="style" crossorigin="anonymous" />
20 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous" />
21 <!-- Accessibility Enhancement -->
22 <style>
23 html {
24 scroll-padding-top: 70px;
25 }
26
27 a.nav-link:hover,
28 a.dropdown-item:hover {
29 color: #ffc107 !important;
30 text-shadow: 0px 2px 4px rgba(255, 193, 7, 0.8);
31 }
32
33 .btn-outline-warning {
34 color: #cd7f32;
35 border-color: #cd7f32;
36 }
37
38 .navbar-brand {
39 color: #d4af37;
40 transition: color 0.3s ease, text-shadow 0.3s ease;
41 }
42
43 .navbar-brand:hover {
44 color: #e9c03d;
45 text-shadow: 0px 2px 4px rgba(203, 163, 120, 0.6);
46 }
47
48 :root {
49 --bs-code-color: revert;
50 }
51 </style>
52 <!-- Open Graph Meta Tags -->
•53 <meta property="og:title" content="ImageMagick | Magick Vector Graphics" />
54 <meta property="og:description" content="Master vector designs with Magick Vector Graphics (MVG) on ImageMagick." />
•55 <meta property="og:image" content="https://imagemagick.org/image/logo.png" />
56 <meta property="og:logo" content="https://imagemagick.org/image/logo.png" />
57 <meta property="og:url" content="https://imagemagick.org/magick-vector-graphics/" />
•58 <meta property="og:type" content="website" />
59 <meta property="og:site_name" content="ImageMagick" />
60 <meta property="og:locale" content="en_us" />
61 <!-- Twitter Card Meta Tags -->
•62 <meta name="twitter:card" content="summary_large_image" />
63 $site=strtolower("ImageMagick");
•64 <meta name="twitter:site" content="@imagemagick" />
65 <meta name="twitter:creator" content="@imagemagick" />
66 <meta name="twitter:title" content="ImageMagick | Magick Vector Graphics" />
•67 <meta name="twitter:description" content="$this- />description" />
68 <meta name="twitter:image" content="https://imagemagick.org/image/logo.png" />
•69 <meta name="twitter:image:alt" content="ImageMagick logo and tag line" />
70 <!-- JSON-LD Structured Data -->
71 <script type="application/ld+json">
72 {
73 "@context": "https://schema.org",
74 "@type": "SoftwareApplication",
75 "name": "ImageMagick",
76 "url": "ImageMagick | Magick Vector Graphics",
77 "image": "https://imagemagick.org/image/logo.png",
78 "description": "$this->description",
79 "applicationCategory": "Multimedia",
80 "operatingSystem": "Windows, macOS, Linux, Unix",
81 "softwareVersion": "7.1.2-27",
82 "license": "https://imagemagick.org/license/",
83 "creator": {
84 "@type": "Organization",
85 "name": "ImageMagick Studio LLC",
86 "url": "https://imagemagick.org"
87 },
88 "keywords": [
89 "".ucfirst($title)."",
90 "image processing software",
91 "image conversion tool",
92 "batch image editing",
93 "open-source image editor",
94 "ImageMagick command-line",
95 "resize images ImageMagick",
96 "crop and rotate images",
97 "ImageMagick tutorial",
98 "ImageMagick automation",
99 "ImageMagick for developers",
100 "ImageMagick CLI",
101 "ImageMagick filters and effects",
102 "ImageMagick scripting",
103 "ImageMagick API integration"
104 ],
105 "sameAs": [
106 "https://github.com/ImageMagick",
107 "https://x.com/imagemagick"
108 ],
109 "offers": {
110 "@type": "Offer",
111 "price": "0.00",
112 "priceCurrency": "USD"
113 }
114 }
115 </script>
116 <!-- Google Custom Search -->
•117 <script async="true" src="https://localhost/cse.js?cx=8720b81722164487b"></script>
118 <script async="true" src="https://localhost/pagead/js/adsbygoogle.js?client=ca-pub-3129977114552745" crossorigin="anonymous"></script>
119 </head>
120
121 <body>
122 <script>
123 function setTheme(theme) {
124 localStorage.setItem('theme', theme);
125 updateThemeIcon(theme);
126 document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? getSystemTheme() : theme);
127 }
128 function getSystemTheme() {
129 return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
130 }
131 function updateThemeIcon(theme) {
132 const iconMap = {
133 light: '☀️',
134 dark: '🌙',
135 auto: '🌓'
136 };
137 document.getElementById('currentThemeIcon').textContent = iconMap[theme] || '🌓';
138 }
139 document.addEventListener('DOMContentLoaded', () => {
140 const savedTheme = localStorage.getItem('theme') || 'auto';
141 setTheme(savedTheme);
142 });
143 </script>
144 <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
145 <div class="container-fluid">
146 <a class="navbar-brand fw-bold" href="../index-2.html" title="ImageMagick">ImageMagick</a>
147 <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">
148 <span class="navbar-toggler-icon"></span>
149 </button>
150
151 <div class="collapse navbar-collapse" id="magick-navbars">
152 <ul class="navbar-nav me-auto">
153 <li class="nav-item">
•154 <a class="nav-link" href="../download/index.html">Download</a>
155 </li>
156 <li class="nav-item">
•157 <a class="nav-link" href="../command-line-tools/index.html">Tools</a>
158 </li>
159 <li class="nav-item">
•160 <a class="nav-link" href="../command-line-processing/index.html">CLI</a>
161 </li>
162 <li class="nav-item">
•163 <a class="nav-link" href="../develop/index.html">Develop</a>
164 </li>
165 <li class="nav-item">
166 <a class="nav-link" rel="noopener noreferrer" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
167 </li>
168 </ul>
169 <ul class="navbar-nav ms-auto">
170 <li class="nav-item ms-3">
171 <form class="d-flex form-inline" action="https://imagemagick.org/magick-vector-graphics/">
•172 <input class="form-control me-2" type="text" name="q" placeholder="Search site..." aria-label="Search" />
173 <button class="btn btn-outline-warning" type="submit" name="sa">Search</button>
174 </form>
175 </li>
176 <li class="nav-item dropdown ms-3">
177 <a class="nav-link dropdown-toggle" href="#" id="themeDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
178 <span id="currentThemeIcon">🌓</span>
179 </a>
180 <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="themeDropdown">
181 <li><a class="dropdown-item" href="#" onclick="setTheme('light')">☀️ Light</a></li>
182 <li><a class="dropdown-item" href="#" onclick="setTheme('dark')">🌙 Dark</a></li>
183 <li><a class="dropdown-item" href="#" onclick="setTheme('auto')">🌓 Auto</a></li>
184 </ul>
185 </li>
186 </ul>
187 </div>
188 </div>
189 </nav>
190
191 <div class="col-lg-8 mx-auto text-body-secondary pt-5 pt-lg-5">
192 <header class="d-flex align-items-center pb-3 mb-5 border-bottom">
193 <div class="mt-3 ms-3">
194 <a href="../index-2.html" class="text-decoration-none">
195 <h1 class="fs-2 mb-1 display-5">Magick Vector Graphics</h1>
196 </a>
197 <h2 class="fs-5 text-muted h4">ImageMagick</h2>
198 </div>
199 </header>
200
201 <main role="main" class="container">
202 <div class="row g-5">
203 <div class="col-md-9">
204 <div>
205 <p class="text-center"><a href="#overview">MVG Overview</a> • <a href="#primitives">Drawing Primitives</a></p>
206
207 <p class="lead">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
208 command 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="https://imagemagick.org/magick-vector-graphics/develop.php">program interfaces</a>. Use this command, for example, to render an arc:</p>
209
210 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary cli"><samp>$ magick -size 100x60 canvas:skyblue -fill white -stroke black \
211 -draw "path 'M 30,40 A 30,20 20 0,0 70,20 A 30,20 20 1,0 30,40 Z '" \
212 arc.png
213 </samp></pre>
214
215 <p>and here is the result:</p>
216
217 <ul>
•218 <a href="https://imagemagick.org/image/arc.png"><img src="https://imagemagick.org/image/arc.png" width="100" height="60" alt="arc" /></a>
219 </ul>
220
221 <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>
222
223 <pre class="overflow-auto p-3 mb-2 text-body-secondary bg-body-tertiary" style="max-height:75svh;"><code>push graphic-context
224 viewbox 0 0 624 369
225 affine 0.283636 0 0 0.283846 -0 -0
226 push graphic-context
227 push graphic-context
228 fill 'darkslateblue'
229 stroke 'blue'
230 stroke-width 1
231 rectangle 1,1 2199,1299
232 pop graphic-context
233 push graphic-context
234 font-size 40
235 fill 'white'
236 stroke-width 1
237 text 600,1100 'Average: 20.0'
238 pop graphic-context
239 push graphic-context
240 fill 'red'
241 stroke 'black'
242 stroke-width 5
243 path 'M700.0,600.0 L340.0,600.0 A360.0,360.0 0 0,1 408.1452123287954,389.2376150414973 z'
244 pop graphic-context
245 push graphic-context
246 font-size 40
247 fill 'white'
248 stroke-width 1
249 text 1400,140 'MagickWand for PHP'
250 pop graphic-context
251 push graphic-context
252 font-size 30
253 fill 'white'
254 stroke-width 1
255 text 1800,140 '(10.0%)'
256 pop graphic-context
257 push graphic-context
258 fill 'red'
259 stroke 'black'
260 stroke-width 4
261 rectangle 1330,100 1370,140
262 pop graphic-context
263 push graphic-context
264 fill 'yellow'
265 stroke 'black'
266 stroke-width 5
267 path 'M700.0,600.0 L408.1452123287954,389.2376150414973 A360.0,360.0 0 0,1 976.5894480359858,369.56936567559273 z'
268 pop graphic-context
269 push graphic-context
270 font-size 40
271 fill 'white'
272 stroke-width 1
273 text 1400,220 'MagickCore'
274 pop graphic-context
275 push graphic-context
276 font-size 30
277 fill 'white'
278 stroke-width 1
279 text 1800,220 '(29.0%)'
280 pop graphic-context
281 push graphic-context
282 fill 'yellow'
283 stroke 'black'
284 stroke-width 4
285 rectangle 1330,180 1370,220
286 pop graphic-context
287 push graphic-context
288 fill 'fuchsia'
289 stroke 'black'
290 stroke-width 5
291 path 'M700.0,600.0 L976.5894480359858,369.56936567559273 A360.0,360.0 0 0,1 964.2680466142854,844.4634932636567 z'
292 pop graphic-context
293 push graphic-context
294 font-size 40
295 fill 'white'
296 stroke-width 1
297 text 1400,300 'MagickWand'
298 pop graphic-context
299 push graphic-context
300 font-size 30
301 fill 'white'
302 stroke-width 1
303 text 1800,300 '(22.9%)'
304 pop graphic-context
305 push graphic-context
306 fill 'fuchsia'
307 stroke 'black'
308 stroke-width 4
309 rectangle 1330,260 1370,300
310 pop graphic-context
311 push graphic-context
312 fill 'blue'
313 stroke 'black'
314 stroke-width 5
315 path 'M700.0,600.0 L964.2680466142854,844.4634932636567 A360.0,360.0 0 0,1 757.853099990584,955.3210081341651 z'
316 pop graphic-context
317 push graphic-context
318 font-size 40
319 fill 'white'
320 stroke-width 1
321 text 1400,380 'JMagick'
322 pop graphic-context
323 push graphic-context
324 font-size 30
325 fill 'white'
326 stroke-width 1
327 text 1800,380 '(10.6%)'
328 pop graphic-context
329 push graphic-context
330 fill 'blue'
331 stroke 'black'
332 stroke-width 4
333 rectangle 1330,340 1370,380
334 pop graphic-context
335 push graphic-context
336 fill 'lime'
337 stroke 'black'
338 stroke-width 5
339 path 'M700.0,600.0 L757.853099990584,955.3210081341651 A360.0,360.0 0 0,1 340.0,600.0 z'
340 pop graphic-context
341 push graphic-context
342 font-size 40
343 fill 'white'
344 stroke-width 1
345 text 1400,460 'Magick++'
346 pop graphic-context
347 push graphic-context
348 font-size 30
349 fill 'white'
350 stroke-width 1
351 text 1800,460 '(27.5%)'
352 pop graphic-context
353 push graphic-context
354 fill 'lime'
355 stroke 'black'
356 stroke-width 4
357 rectangle 1330,420 1370,460
358 pop graphic-context
359 push graphic-context
360 font-size 100
361 fill 'white'
362 stroke-width 1
363 text 100,150 'ImageMagick'
364 pop graphic-context
365 push graphic-context
366 fill 'none'
367 stroke 'black'
368 stroke-width 5
369 circle 700,600 700,960
370 pop graphic-context
371 pop graphic-context
372 pop graphic-context
373 </code></pre>
374
375 <p>to render a pie chart with this command:</p>
376
377 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary cli"><samp>$ magick mvg:piechart.mvg piechart.png
378 </samp></pre>
379
380 <p>which produces this rendering:</p>
381
382 <ul>
•383 <a href="https://imagemagick.org/image/piechart.png"><img src="https://imagemagick.org/image/piechart.png" width="624" height="369" alt="piechart" /></a>
384 </ul>
385
386 <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>
387
388 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary cli"><samp>$ magick mvg:piechart.svg piechart.jpg
389 </samp></pre>
390
391
392 <p>to produce the same pie chart we created with the MVG language.</p>
393
394 <p>Drawing is available from many of the ImageMagick <a href="https://imagemagick.org/magick-vector-graphics/develop.php">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="https://imagemagick.org/magick-wand">MagickWand</a> language: </p>
395
396 <pre class="overflow-auto p-3 mb-2 text-body-secondary bg-body-tertiary" style="max-height:75svh;"><code>(void) PushDrawingWand(draw_wand);
397 {
398 const PointInfo points[6] =
399 {
400 { 180,504 },
401 { 282.7,578.6 },
402 { 243.5,699.4 },
403 { 116.5,699.4 },
404 { 77.26,578.6 },
405 { 180,504 }
406 };
407
408 DrawSetStrokeAntialias(draw_wand,True);
409 DrawSetStrokeWidth(draw_wand,9);
410 DrawSetStrokeLineCap(draw_wand,RoundCap);
411 DrawSetStrokeLineJoin(draw_wand,RoundJoin);
412 (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
413 (void) PixelSetColor(color,"#4000c2");
414 DrawSetStrokeColor(draw_wand,color);
415 DrawSetFillRule(draw_wand,EvenOddRule);
416 (void) PixelSetColor(color,"#800000");
417 DrawSetFillColor(draw_wand,color);
418 DrawPolygon(draw_wand,6,points);
419 }
420 (void) PopDrawingWand(draw_wand);
421 </code></pre>
422
423 <h2><a class="anchor" id="overview"></a>MVG Overview</h2>
424
425 <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>
426
427 <p>Metafile wrapper syntax (to support stand-alone MVG files):</p>
428
429 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>push graphic-context
430 viewbox 0 0 width height
431 [ any other MVG commands ]
432 pop graphic-context
433 </code></pre>
434
435 <p>Pattern syntax (saving and restoring context):</p>
436
437 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>push pattern id x,y width,height
438 push graphic-context
439 [ drawing commands ]
440 pop graphic-context
441 pop pattern
442 </code></pre>
443
444 <p>an example is (%s is a identifier string):</p>
445
446 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>push defs
447 push pattern %s 10,10 20,20
448 push graphic-context
449 fill red
450 rectangle 5,5 15,15
451 pop graphic-context
452 push graphic-context
453 fill green
454 rectangle 10,10 20,20
455 pop graphic-context
456 pop pattern
457 pop defs
458 </code></pre>
459
460 <p>For image tiling use:</p>
461
462 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>push pattern id x,y width,height
463 image Copy ...
464 pop pattern
465 </code></pre>
466
467 <p>Note you can use the pattern for either the fill or stroke like:</p>
468
469 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>stroke url(#%s)
470 </code></pre>
471
472 <p>or</p>
473
474 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>fill url(#%s)
475 </code></pre>
476
477 <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>
478
479 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>push defs
480 push clip-path "myClipPath"
481 push graphic-context
482 rectangle 10,10 20,20
483 pop graphic-context
484 pop clip-path
485 pop defs
486 clip-path url(#myClipPath)
487 </code></pre>
488
489 <h2><a class="anchor" id="primitives"></a>Drawing Primitives</h2>
490
491 <p>Here is a complete description of the MVG drawing primitives:</p>
492
493 <div>
494 <table class="table table-sm table-hover table-striped table-responsive">
495 <thead>
496 <tr>
497 <th>Primitive</th>
498 <th>Description</th>
499 </tr>
500 </thead>
501 <tbody>
502 <tr>
503 <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>
504 <td></td>
505 </tr>
506 <tr>
507 <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>
508 <td></td>
509 </tr>
510 <tr>
511 <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>
512 <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>
513 </tr>
514 <tr>
515 <td><a class="anchor" id="border-color"></a>border-color <var>color</var></td>
516 <td></td>
517 </tr>
518 <tr>
519 <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>
520 <td></td>
521 </tr>
522 <tr>
523 <td><a class="anchor" id="clip-path"></a>clip-path url(<var>name</var>)</td>
524 <td></td>
525 </tr>
526 <tr>
527 <td><a class="anchor" id="clip-rule"></a>clip-rule <var>rule</var></td>
528 <td>Choose from these rule types:
529 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>evenodd
530 nonzero</code></pre></td>
531 </tr>
532 <tr>
533 <td><a class="anchor" id="clip-units"></a>clip-units <var>units</var></td>
534 <td>Choose from these unit types:
535 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>userSpace
536 userSpaceOnUse
537 objectBoundingBox</code></pre></td>
538 </tr>
539 <tr>
540 <td><a class="anchor" id="color"></a>color <var>x</var>,<var>y</var> <var>method</var></td>
541 <td>Choose from these method types:
542 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>point
543 replace
544 floodfill
545 filltoborder
546 reset</code></pre></td>
547 </tr>
548 <tr>
549 <td><a class="anchor" id="compliance"></a>compliance <var>type</var></td>
550 <td>Choose from these compliance types: MVG or SVG</td>
551 </tr>
552 <tr>
553 <td><a class="anchor" id="decorate"></a>decorate <var>type</var></td>
554 <td>Choose from these types of decorations:
555 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>none
556 line-through
557 overline
558 underline</code></pre></td>
559 </tr>
560 <tr>
561 <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>
562 <td></td>
563 </tr>
564 <tr>
565 <td><a class="anchor" id="fill"></a>fill <var>color</var></td>
566 <td>Choose from any of these <a href="../color/index.html">colors</a>.</td>
567 </tr>
568 <tr>
569 <td><a class="anchor" id="fill-opacity"></a>fill-opacity <var>opacity</var></td>
570 <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td>
571 </tr>
572 <tr>
573 <td><a class="anchor" id="fill-rule"></a>fill-rule <var>rule</var></td>
574 <td>Choose from these rule types:
575 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>evenodd
576 nonzero</code></pre></td>
577 </tr>
578 <tr>
579 <td><a class="anchor" id="font"></a>font <var>name</var></td>
580 <td></td>
581 </tr>
582 <tr>
583 <td><a class="anchor" id="font-family"></a>font-family <var>family</var></td>
584 <td></td>
585 </tr>
586 <tr>
587 <td><a class="anchor" id="font-size"></a>font-size <var>point-size</var></td>
588 <td></td>
589 </tr>
590 <tr>
591 <td><a class="anchor" id="font-stretch"></a>font-stretch <var>type</var></td>
592 <td>Choose from these stretch types:
593 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>all
594 normal
595 ultra-condensed
596 extra-condensed
597 condensed
598 semi-condensed
599 semi-expanded
600 expanded
601 extra-expanded
602 ultra-expanded</code></pre></td>
603 </tr>
604 <tr>
605 <td><a class="anchor" id="font-style"></a>font-style <var>style</var></td>
606 <td>Choose from these styles:
607 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>all
608 normal
609 italic
610 oblique</code></pre></td>
611 </tr>
612 <tr>
613 <td><a class="anchor" id="font-weight"></a>font-weight <var>weight</var></td>
614 <td>Choose from these weights:
615 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>all
616 normal
617 bold
618 100
619 200
620 300
621 400
622 500
623 600
624 700
625 800
626 900</code></pre></td>
627 </tr>
628 <tr>
629 <td><a class="anchor" id="gradient-units"></a>gradient-units <var>units</var></td>
630 <td>Choose from these units:
631 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>userSpace
632 userSpaceOnUse
633 objectBoundingBox</code></pre></td>
634 </tr>
635 <tr>
636 <td><a class="anchor" id="gravity"></a>gravity <var>type</var></td>
637 <td>Choose from these gravity types:
638 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>NorthWest
639 North
640 NorthEast
641 West
642 Center
643 East
644 SouthWest
645 South
646 SouthEast</code></pre></td>
647 </tr>
648 <tr>
649 <td><a class="anchor" id="compose"></a>image <var>compose x,y width,height 'filename'</var></td>
650 <td>Choose from these compose operations:
651 <table class="table table-sm table-hover table-striped table-responsive">
652 <tbody>
653 <tr>
654 <th align="left" style="width: 8%">Method</th>
655 <th align="left">Description</th>
656 </tr>
657
658 <tr>
659 <td>clear</td>
660 <td>Both the color and the alpha of the destination are cleared. Neither the source nor the destination are used as input.</td>
661 </tr>
662
663 <tr>
664 <td>src</td>
665 <td>The source is copied to the destination. The destination is not used as input.</td>
666 </tr>
667
668 <tr>
669 <td>dst</td>
670 <td>The destination is left untouched.</td>
671 </tr>
672
673 <tr>
674 <td><b>src-over</b></td>
675 <td>The source is composited over the destination.</td>
676 </tr>
677
678 <tr>
679 <td>dst-over</td>
680 <td>The destination is composited over the source and the result replaces the destination.</td>
681 </tr>
682
683 <tr>
684 <td>src-in</td>
685 <td>The part of the source lying inside of the destination replaces the destination.</td>
686 </tr>
687
688 <tr>
689 <td>dst-in</td>
690 <td>The part of the destination lying inside of the source replaces the destination.</td>
691 </tr>
692
693 <tr>
694 <td>src-out</td>
695 <td>The part of the source lying outside of the destination replaces the destination.</td>
696 </tr>
697
698 <tr>
699 <td>dst-out</td>
700 <td>The part of the destination lying outside of the source replaces the destination.</td>
701 </tr>
702
703 <tr>
704 <td>src-atop</td>
705 <td>The part of the source lying inside of the destination is composited onto the destination.</td>
706 </tr>
707
708 <tr>
709 <td>dst-atop</td>
710 <td>The part of the destination lying inside of the source is composited over the source and replaces the destination.</td>
711 </tr>
712
713 <tr>
714 <td>multiply</td>
715 <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>
716 </tr>
717
718 <tr>
719 <td>screen</td>
720 <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>
721 </tr>
722
723 <tr>
724 <td>overlay</td>
725 <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>
726 </tr>
727
728 <tr>
729 <td>darken</td>
730 <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>
731 </tr>
732
733 <tr>
734 <td>lighten</td>
735 <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>
736 </tr>
737
738 <tr>
739 <td>linear-light</td>
740 <td>Increase contrast slightly with an impact on the foreground's tonal values.</td>
741 </tr>
742
743 <tr>
744 <td>color-dodge</td>
745 <td>Brightens the destination color to reflect the source color. Painting with black produces no change.</td>
746 </tr>
747
748 <tr>
749 <td>color-burn</td>
750 <td>Darkens the destination color to reflect the source color. Painting with white produces no change.</td>
751 </tr>
752
753 <tr>
754 <td>hard-light</td>
755 <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>
756 </tr>
757
758 <tr>
759 <td>soft-light</td>
760 <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>
761 </tr>
762
763 <tr>
764 <td>plus</td>
765 <td>The source is added to the destination and replaces the destination. This operator is useful for animating a dissolve between two images.</td>
766 </tr>
767
768 <tr>
769 <td>add</td>
770 <td>As per 'plus' but transparency data is treated as matte
771 values. As such any transparent areas in either image remain
772 transparent. </td>
773 </tr>
774
775 <tr>
776 <td>minus</td>
777 <td>Subtract the colors in the source image from the
778 destination image. When transparency is involved, Opaque areas will be
779 subtracted from any destination opaque areas. </td>
780 </tr>
781
782 <tr>
783 <td>subtract</td>
784 <td>Subtract the colors in the source image from the
785 destination image. When transparency is involved transparent areas are
786 subtracted, so only the opaque areas in the source remain opaque in
787 the destination image. </td>
788 </tr>
789
790 <tr>
791 <td>difference</td>
792 <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>
793 </tr>
794
795 <tr>
796 <td>exclusion</td>
797 <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>
798 </tr>
799
800 <tr>
801 <td>xor</td>
802 <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>
803 </tr>
804
805 <tr>
806 <td>copy-*</td>
807 <td>Copy the specified channel in the source image to the
808 same channel in the destination image. If the channel specified in
809 the source image does not exist, (which can only happen for methods,
810 '<code>copy-opacity</code>' or '<code>copy-black</code>') then it is
811 assumed that the source image is a special grayscale channel image
812 of the values to be copied. </td>
813 </tr>
814
815 <tr>
816 <td>change-mask</td>
817 <td>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>
818 </tr>
819 </tbody>
820 </table></td>
821 </tr>
822 <tr>
823 <td><a class="anchor" id="interline-spacing"></a>interline-spacing <var>pixels</var></td>
824 <td></td>
825 </tr>
826 <tr>
827 <td><a class="anchor" id="interword-spacing"></a>interword-spacing <var>pixels</var></td>
828 <td></td>
829 </tr>
830 <tr>
831 <td><a class="anchor" id="kerning"></a>kerning <var>pixels</var></td>
832 <td></td>
833 </tr>
834 <tr>
835 <td><a class="anchor" id="line"></a>line <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
836 <td></td>
837 </tr>
838 <tr>
839 <td><a class="anchor" id="matte"></a>matte <var>x,y method</var></td>
840 <td>Choose from these methods:
841 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>point
842 replace
843 floodfill
844 filltoborder
845 reset</code></pre></td>
846 </tr>
847 <tr>
848 <td><a class="anchor" id="offset"></a>offset <var>offset</var></td>
849 <td></td>
850 </tr>
851 <tr>
852 <td><a class="anchor" id="opacity"></a>opacity <var>opacity</var></td>
853 <td>Use percent (e.g. 50%).</td>
854 </tr>
855 <tr>
856 <td><a class="anchor" id="path"></a>path <var>path</var></td>
857 <td></td>
858 </tr>
859 <tr>
860 <td><a class="anchor" id="point"></a>point <var>x,y</var></td>
861 <td></td>
862 </tr>
863 <tr>
864 <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>
865 <td></td>
866 </tr>
867 <tr>
868 <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>
869 <td></td>
870 </tr>
871 <tr>
872 <td><a class="anchor" id="pop-clip-path"></a>pop clip-path</td>
873 <td></td>
874 </tr>
875 <tr>
876 <td><a class="anchor" id="pop-defs"></a>pop defs</td>
877 <td></td>
878 </tr>
879 <tr>
880 <td><a class="anchor" id="pop-gradient"></a>pop gradient</td>
881 <td></td>
882 </tr>
883 <tr>
884 <td><a class="anchor" id="pop-graphic-context"></a>pop graphic-context</td>
885 <td></td>
886 </tr>
887 <tr>
888 <td><a class="anchor" id="pop-pattern"></a>pop pattern</td>
889 <td></td>
890 </tr>
891 <tr>
892 <td><a class="anchor" id="push"></a>push clip-path "<var>name</var>"</td>
893 <td></td>
894 </tr>
895 <tr>
896 <td><a class="anchor" id="push-defs"></a>push defs</td>
897 <td></td>
898 </tr>
899 <tr>
900 <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>
901 <td></td>
902 </tr>
903 <tr>
904 <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>
905 <td></td>
906 </tr>
907 <tr>
908 <td><a class="anchor" id="push-graphic-context"></a>push graphic-context { "<var>id</var>" }</td>
909 <td>the <em>id</em> is optional</td>
910 </tr>
911 <tr>
912 <td><a class="anchor" id="push-pattern"></a>push pattern <var>id x,y width,height</var></td>
913 <td></td>
914 </tr>
915 <tr>
916 <td><a class="anchor" id="rectangle"></a>rectangle <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
917 <td></td>
918 </tr>
919 <tr>
920 <td><a class="anchor" id="rotate"></a>rotate <var>angle</var></td>
921 <td></td>
922 </tr>
923 <tr>
924 <td><a class="anchor" id="roundrectangle"></a>roundrectangle <var>x,y x<sub>1</sub>,y<sub>1</sub> width,height</var></td>
925 <td></td>
926 </tr>
927 <tr>
928 <td><a class="anchor" id="scale"></a>scale <var>x,y</var></td>
929 <td></td>
930 </tr>
931 <tr>
932 <td><a class="anchor" id="skewX"></a>skewX <var>angle</var></td>
933 <td></td>
934 </tr>
935 <tr>
936 <td><a class="anchor" id="skewY"></a>skewX <var>angle</var></td>
937 <td></td>
938 </tr>
939 <tr>
940 <td><a class="anchor" id="stop-color"></a>stop-color <var>color offset</var></td>
941 <td></td>
942 </tr>
943 <tr>
944 <td><a class="anchor" id="stroke"></a>stroke <var>color</var></td>
945 <td></td>
946 </tr>
947 <tr>
948 <td><a class="anchor" id="stroke-antialias"></a>stroke-antialias <var>0 • 1</var></td>
949 <td></td>
950 </tr>
951 <tr>
952 <td><a class="anchor" id="stroke-dasharray"></a>stroke-dasharray <var>none • numeric-list</var></td>
953 <td></td>
954 </tr>
955 <tr>
956 <td><a class="anchor" id="stroke-dashoffset"></a>stroke-dashoffset <var>offset</var></td>
957 <td></td>
958 </tr>
959 <tr>
960 <td><a class="anchor" id="stroke-linecap"></a>stroke-linecap <var>type</var></td>
961 <td>Choose from these cap types:
962 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>butt
963 round
964 square</code></pre></td>
965 </tr>
966 <tr>
967 <td><a class="anchor" id="stroke-linejoin"></a>stroke-linejoin <var>type</var></td>
968 <td>Choose from these join types:
969 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>bevel
970 miter
971 round</code></pre></td>
972 </tr>
973 <tr>
974 <td><a class="anchor" id="stroke-miterlimit"></a>stroke-miterlimit <var>limit</var></td>
975 <td></td>
976 </tr>
977 <tr>
978 <td><a class="anchor" id="stroke-opacity"></a>stroke-opacity <var>opacity</var></td>
979 <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td>
980 </tr>
981 <tr>
982 <td><a class="anchor" id="stroke-width"></a>stroke-width <var>width</var></td>
983 <td></td>
984 </tr>
985 <tr>
986 <td><a class="anchor" id="text"></a>text <var>"text"</var></td>
987 <td></td>
988 </tr>
989 <tr>
990 <td><a class="anchor" id="text-antialias"></a>text-antialias <var>0 • 1</var></td>
991 <td></td>
992 </tr>
993 <tr>
994 <td><a class="anchor" id="text-undercolor"></a>text-undercolor <var>color</var></td>
995 <td></td>
996 </tr>
997 <tr>
998 <td><a class="anchor" id="translate"></a>translate <var>x,y</var></td>
999 <td></td>
1000 </tr>
1001 <tr>
1002 <td><a class="anchor" id="use"></a>use "<var>url(#id)</var>"</td>
1003 <td></td>
1004 </tr>
1005 <tr>
1006 <td><a class="anchor" id="viewbox"></a>viewbox <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
1007 <td></td>
1008 </tr>
1009 </tbody>
1010 </table></div>
1011 <p>Note, the primitives are case sensitive, e.g., use <code>viewbox</code>, not <code>viewBox</code>.</p>
1012 </div>
1013
1014 </div>
1015 <div class="col-md-3">
1016 <div class="container text-center my-3">
1017 <a href="../image/wizard.png" rel="noopener noreferrer" target="_blank">
•1018 <img alt="The Tao of the Spiritual Warrior" class="img-fluid img-thumbnail" height="1468" loading="lazy" src="../image/wizard.png" width="1104" />
1019 </a>
1020 <p class="mt-2"><iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe></p>
1021 </div>
1022 <div class="container text-center my-3">
•1023 <script async="true" src="https://localhost/pagead/js/adsbygoogle.js?client=ca-pub-3129977114552745"
1024 crossorigin="anonymous"></script>
1025 <!-- Banner Ad -->
1026 <ins class="adsbygoogle"
1027 style="display:block"
1028 data-ad-client="ca-pub-3129977114552745"
1029 data-ad-slot="1083537442"
1030 data-ad-format="auto"
1031 data-full-width-responsive="true"></ins>
1032 <script>
1033 (adsbygoogle = window.adsbygoogle || []).push({});
1034 </script>
1035 </div>
1036 </div>
1037 </div>
1038 <a aria-label="About ImageMagick" class="btn btn-outline-warning mt-3" href="../index-2.html">About ImageMagick</a>
1039 </main><!-- /.container -->
1040 <footer class="text-center pt-5 my-5 text-body-secondary border-top">
1041 <div class="container-fluid">
1042 <a href="../security-policy/index.html">Security</a> •
1043 <a href="../news/index.html">News</a>
•1044
1045 <a href="#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../image/wand.ico" /></a>
1046
1047 <a href="../links/index.html">Related</a> •
1048 <a href="../sitemap/index.html">Sitemap</a>
•1049 <br />
1050 <a href="../support/index.html">Sponsor</a> •
1051 <a href="../cite/index.html">Cite</a> •
1052 <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
1053 <a href="https://github.com/ImageMagick/ImageMagick/discussions">Contact Us</a>
•1054 <br />
1055 <a href="https://github.com/imagemagick/imagemagick" rel="noopener noreferrer" target="_blank" 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">
1056 <title>GitHub</title>
1057 <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" />
1058 </svg></a> •
1059 <a href="https://twitter.com/imagemagick" rel="noopener noreferrer" target="_blank" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 300 300" width="2%" height="2%" role="img" focusable="false">
1060 <title>Twitter</title>
1061 <path d="M178.57 127.15 290.27 0h-26.46l-97.03 110.38L89.34 0H0l117.13 166.93L0 300.25h26.46l102.4-116.59 81.8 116.59h89.34M36.01 19.54H76.66l187.13 262.13h-40.66" />
1062 </svg></a>
•1063 <br />
1064 <small>Copyright © 1999 ImageMagick Studio LLC</small>
1065 </div>
1066 </footer>
1067 <div style="visibility: hidden;">
1068 <div class="gcse-search"></div>
1069 </div>
1070 </div>
1071
1072 <!-- Javascript assets -->
1073 <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
1074 </body>
1075
1076
1077 </html>