summaryrefslogtreecommitdiff
path: root/www/magick-vector-graphics.html
blob: 6ff304fc0be81daea7ca1c74009d917ebc038cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925




<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8"  />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"  />
  <title>ImageMagick - Magick Vector Graphics</title>
  <meta name="application-name" content="ImageMagick" />
  <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." />
  <meta name="application-url" content="https://imagemagick.org" />
  <meta name="generator" content="PHP" />
  <meta name="keywords" content="magick, vector, graphics, image converter, image resizer, image editor, photo editor, jpg converter, png converter, tiff converter, vector images, online, free, swiss army" />
  <meta name="rating" content="GENERAL" />
  <meta name="robots" content="INDEX, FOLLOW" />
  <meta name="generator" content="ImageMagick Studio LLC" />
  <meta name="author" content="ImageMagick Studio LLC" />
  <meta name="revisit-after" content="2 DAYS" />
  <meta name="resource-type" content="document" />
  <meta name="copyright" content="Copyright (c) 1999-2020 ImageMagick Studio LLC" />
  <meta name="distribution" content="Global" />
  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
  <meta property='og:url' content='../' />
  <meta property='og:title' content='ImageMagick' />
  <meta property='og:image' content='../images/logo.png' />
  <meta property='og:type' content='website' />
  <meta property='og:site_name' content='ImageMagick' />
  <meta property='og:description' content="Create, Edit, Compose, or Convert Bitmap Images" />
  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
  <link href="magick-vector-graphics.html" rel="canonical" />
  <link href="../images/wand.png" rel="icon" />
  <link href="../images/wand.ico" rel="shortcut icon" />
  <link href="assets/magick.css" rel="stylesheet" />
</head>
<body>
  <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
    <a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="navbar-collapse collapse" id="navbarsMagick" style="">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item ">
        <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item ">
        <a class="nav-link" href="download.html">Download</a>
      </li>
      <li class="nav-item ">
        <a class="nav-link" href="command-line-tools.html">Tools</a>
      </li>
      <li class="nav-item ">
        <a class="nav-link" href="command-line-processing.html">Command-line</a>
      </li>
      <li class="nav-item ">
        <a class="nav-link" href="develop.html">Develop</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
      </li>
      <li class="nav-item">
          
      </li>
      <li class="nav-item">
        <iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe>
      </li>
    </ul>
    </div>
    <form class="form-inline my-2 my-md-0" action="search.html">
      <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
      <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
    </form>
  </nav>
  <div class="container">
   <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-3129977114552745"
         data-ad-slot="6345125851"
         data-full-width-responsive="true"
         data-ad-format="horizontal"></ins>
    <script>
      (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

  </div>

  <main role="main" class="container">
    <div class="magick-template">
<div class="magick-header">
<h1 class="text-center">Magick Vector Graphics</h1>
<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>

<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
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="develop.html">program interfaces</a>.  Use this command, for example, to render an arc:</p>

<pre class="highlight"><code>magick -size 100x60 canvas:skyblue -fill white -stroke black \
  -draw "path 'M 30,40  A 30,20  20  0,0 70,20 A 30,20  20  1,0 30,40 Z '" \
  arc.png
</code></pre>

<p>and here is the result:</p>

<ul>
  <a href="../images/arc.png"><img src="../images/arc.png" width="100" height="60" alt="arc" /></a>
</ul>

<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>

<pre class="pre-scrollable"><code>push graphic-context
  viewbox 0 0 624 369
  affine 0.283636 0 0 0.283846 -0 -0
  push graphic-context
    push graphic-context
      fill 'darkslateblue'
      stroke 'blue'
      stroke-width 1
      rectangle 1,1 2199,1299
    pop graphic-context
    push graphic-context
      font-size 40
      fill 'white'
      stroke-width 1
      text 600,1100 'Average: 20.0'
    pop graphic-context
    push graphic-context
      fill 'red'
      stroke 'black'
      stroke-width 5
      path 'M700.0,600.0 L340.0,600.0 A360.0,360.0 0 0,1 408.1452123287954,389.2376150414973 z'
    pop graphic-context
    push graphic-context
      font-size 40
      fill 'white'
      stroke-width 1
      text 1400,140 'MagickWand for PHP'
    pop graphic-context
    push graphic-context
      font-size 30
      fill 'white'
      stroke-width 1
      text 1800,140 '(10.0%)'
    pop graphic-context
    push graphic-context
      fill 'red'
      stroke 'black'
      stroke-width 4
      rectangle 1330,100 1370,140
    pop graphic-context
    push graphic-context
      fill 'yellow'
      stroke 'black'
      stroke-width 5
      path 'M700.0,600.0 L408.1452123287954,389.2376150414973 A360.0,360.0 0 0,1 976.5894480359858,369.56936567559273 z'
    pop graphic-context
    push graphic-context
      font-size 40
      fill 'white'
      stroke-width 1
      text 1400,220 'MagickCore'
    pop graphic-context
    push graphic-context
      font-size 30
      fill 'white'
      stroke-width 1
      text 1800,220 '(29.0%)'
    pop graphic-context
    push graphic-context
      fill 'yellow'
      stroke 'black'
      stroke-width 4
      rectangle 1330,180 1370,220
    pop graphic-context
    push graphic-context
      fill 'fuchsia'
      stroke 'black'
      stroke-width 5
      path 'M700.0,600.0 L976.5894480359858,369.56936567559273 A360.0,360.0 0 0,1 964.2680466142854,844.4634932636567 z'
    pop graphic-context
    push graphic-context
      font-size 40
      fill 'white'
      stroke-width 1
      text 1400,300 'MagickWand'
    pop graphic-context
    push graphic-context
      font-size 30
      fill 'white'
      stroke-width 1
      text 1800,300 '(22.9%)'
    pop graphic-context
    push graphic-context
      fill 'fuchsia'
      stroke 'black'
      stroke-width 4
      rectangle 1330,260 1370,300
    pop graphic-context
    push graphic-context
      fill 'blue'
      stroke 'black'
      stroke-width 5
      path 'M700.0,600.0 L964.2680466142854,844.4634932636567 A360.0,360.0 0 0,1 757.853099990584,955.3210081341651 z'
    pop graphic-context
    push graphic-context
      font-size 40
      fill 'white'
      stroke-width 1
      text 1400,380 'JMagick'
    pop graphic-context
    push graphic-context
      font-size 30
      fill 'white'
      stroke-width 1
      text 1800,380 '(10.6%)'
    pop graphic-context
    push graphic-context
      fill 'blue'
      stroke 'black'
      stroke-width 4
      rectangle 1330,340 1370,380
    pop graphic-context
    push graphic-context
      fill 'lime'
      stroke 'black'
      stroke-width 5
      path 'M700.0,600.0 L757.853099990584,955.3210081341651 A360.0,360.0 0 0,1 340.0,600.0 z'
    pop graphic-context
    push graphic-context
      font-size 40
      fill 'white'
      stroke-width 1
      text 1400,460 'Magick++'
    pop graphic-context
    push graphic-context
      font-size 30
      fill 'white'
      stroke-width 1
      text 1800,460 '(27.5%)'
    pop graphic-context
    push graphic-context
      fill 'lime'
      stroke 'black'
      stroke-width 4
      rectangle 1330,420 1370,460
    pop graphic-context
    push graphic-context
      font-size 100
      fill 'white'
      stroke-width 1
      text 100,150 'ImageMagick'
    pop graphic-context
    push graphic-context
      fill 'none'
      stroke 'black'
      stroke-width 5
      circle 700,600 700,960
    pop graphic-context
  pop graphic-context
pop graphic-context
</code></pre>

<p>to render a pie chart with this command:</p>

<pre class="highlight"><code>magick mvg:piechart.mvg piechart.png
</code></pre>

<p>which produces this rendering:</p>

<ul>
  <a href="../images/piechart.png"><img src="../images/piechart.png" width="624" height="369" alt="piechart" /></a>
</ul>

<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>

<pre class="highlight"><code>magick mvg:piechart.svg piechart.jpg
</code></pre>


<p>to produce the same pie chart we created with the MVG language.</p>

<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="magick-wand.html">MagickWand</a> language: </p>

<pre class="pre-scrollable"><code>(void) PushDrawingWand(draw_wand);
{
  const PointInfo points[6] =
  {
    { 180,504 },
    { 282.7,578.6 },
    { 243.5,699.4 },
    { 116.5,699.4 },
    { 77.26,578.6 },
    { 180,504 }
  };

  DrawSetStrokeAntialias(draw_wand,True);
  DrawSetStrokeWidth(draw_wand,9);
  DrawSetStrokeLineCap(draw_wand,RoundCap);
  DrawSetStrokeLineJoin(draw_wand,RoundJoin);
  (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
  (void) PixelSetColor(color,"#4000c2");
  DrawSetStrokeColor(draw_wand,color);
  DrawSetFillRule(draw_wand,EvenOddRule);
  (void) PixelSetColor(color,"#800000");
  DrawSetFillColor(draw_wand,color);
  DrawPolygon(draw_wand,6,points);
}
(void) PopDrawingWand(draw_wand);
</code></pre>

<h2><a class="anchor" id="overview"></a>MVG Overview</h2>

<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>

<p>Metafile wrapper syntax (to support stand-alone MVG files):</p>

<pre class="highlight"><code>push graphic-context
  viewbox 0 0 width height
  [ any other MVG commands ]
pop graphic-context
</code></pre>

<p>Pattern syntax (saving and restoring context):</p>

<pre class="highlight"><code>push pattern id x,y width,height
 push graphic-context
  [ drawing commands ]
 pop graphic-context
pop pattern
</code></pre>

<p>an example is (%s is a identifier string):</p>

<pre class="highlight"><code>push defs
 push pattern %s 10,10 20,20
  push graphic-context
   fill red
   rectangle 5,5 15,15
  pop graphic-context
  push graphic-context
   fill green
   rectangle 10,10 20,20
  pop graphic-context
 pop pattern
pop defs
</code></pre>

<p>For image tiling use:</p>

<pre class="highlight"><code>push pattern id x,y width,height
 image Copy ...
pop pattern
</code></pre>

<p>Note you can use the pattern for either the fill or stroke like:</p>

<pre class="highlight"><code>stroke url(#%s)
</code></pre>

<p>or</p>

<pre class="highlight"><code>fill url(#%s)
</code></pre>

<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>

<pre class="highlight"><code>push defs
 push clip-path "myClipPath"
  push graphic-context
   rectangle 10,10 20,20
  pop graphic-context
 pop clip-path
pop defs
clip-path url(#myClipPath)
</code></pre>

<h2><a class="anchor" id="primitives"></a>Drawing Primitives</h2>

<p>Here is a complete description of the MVG drawing primitives:</p>

<div class="table-responsive" style="font-size:87.5% !important;">
<table class="table table-sm table-hover">
  <tr>
    <th>Primitive</th>
    <th>Description</th>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <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>
    <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>
  </tr>
  <tr>
    <td><a class="anchor" id="border-color"></a>border-color <var>color</var></td>
    <td></td>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="clip-path"></a>clip-path url(<var>name</var>)</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="clip-rule"></a>clip-rule <var>rule</var></td>
    <td>Choose from these rule types:
<pre class="highlight"><code>evenodd
nonzero</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="clip-units"></a>clip-units <var>units</var></td>
    <td>Choose from these unit types:
<pre class="highlight"><code>userSpace
userSpaceOnUse
objectBoundingBox</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="color"></a>color <var>x</var>,<var>y</var> <var>method</var></td>
    <td>Choose from these method types:
<pre class="highlight"><code>point
replace
floodfill
filltoborder
reset</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="compliance"></a>compliance <var>type</var></td>
    <td>Choose from these compliance types: MVG or SVG</td>
  </tr>
  <tr>
    <td><a class="anchor" id="decorate"></a>decorate <var>type</var></td>
    <td>Choose from these types of decorations:
<pre class="highlight"><code>none
line-through
overline
underline</code></pre></td>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="fill"></a>fill <var>color</var></td>
    <td>Choose from any of these <a href="color.html">colors</a>.</td>
  </tr>
  <tr>
    <td><a class="anchor" id="fill-opacity"></a>fill-opacity <var>opacity</var></td>
    <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td>
  </tr>
  <tr>
    <td><a class="anchor" id="fill-rule"></a>fill-rule <var>rule</var></td>
    <td>Choose from these rule types:
<pre class="highlight"><code>evenodd
nonzero</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="font"></a>font <var>name</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="font-family"></a>font-family <var>family</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="font-size"></a>font-size <var>point-size</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="font-stretch"></a>font-stretch <var>type</var></td>
    <td>Choose from these stretch types:
<pre class="highlight"><code>all
normal
ultra-condensed
extra-condensed
condensed
semi-condensed
semi-expanded
expanded
extra-expanded
ultra-expanded</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="font-style"></a>font-style <var>style</var></td>
    <td>Choose from these styles:
<pre class="highlight"><code>all
normal
italic
oblique</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="font-weight"></a>font-weight <var>weight</var></td>
    <td>Choose from these weights:
<pre class="highlight"><code>all
normal
bold
100
200
300
400
500
600
700
800
900</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="gradient-units"></a>gradient-units <var>units</var></td>
    <td>Choose from these units:
<pre class="highlight"><code>userSpace
userSpaceOnUse
objectBoundingBox</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="gravity"></a>gravity <var>type</var></td>
    <td>Choose from these gravity types:
<pre class="highlight"><code>NorthWest
North
NorthEast
West
Center
East
SouthWest
South
SouthEast</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="compose"></a>image <var>compose x,y width,height 'filename'</var></td>
    <td>Choose from these compose operations:
    <table id="table" cellpadding="2" cellspacing="0" style="width: 93%">
  <tbody>
  <tr>
    <th align="left" style="width: 8%">Method</th>
    <th align="left">Description</th>
  </tr>

  <tr>
    <td>clear</td>
    <td>Both the color and the alpha of the destination are cleared. Neither the source nor the destination are used as input.</td>
  </tr>

  <tr>
    <td>src</td>
    <td>The source is copied to the destination. The destination is not used as input.</td>
  </tr>

  <tr>
    <td>dst</td>
    <td>The destination is left untouched.</td>
  </tr>

  <tr>
    <td><b>src-over</b></td>
    <td>The source is composited over the destination.</td>
  </tr>

  <tr>
    <td>dst-over</td>
    <td>The destination is composited over the source and the result replaces the destination.</td>
  </tr>

  <tr>
    <td>src-in</td>
    <td>The part of the source lying inside of the destination replaces the destination.</td>
  </tr>

  <tr>
    <td>dst-in</td>
    <td>The part of the destination lying inside of the source replaces the destination.</td>
  </tr>

  <tr>
    <td>src-out</td>
    <td>The part of the source lying outside of the destination replaces the destination.</td>
  </tr>

  <tr>
    <td>dst-out</td>
    <td>The part of the destination lying outside of the source         replaces the destination.</td>
  </tr>

  <tr>
    <td>src-atop</td>
    <td>The part of the source lying inside of the destination is  composited onto the destination.</td>
  </tr>

  <tr>
    <td>dst-atop</td>
    <td>The part of the destination lying inside of the source is composited over the source and replaces the destination.</td>
  </tr>

  <tr>
    <td>multiply</td>
    <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>
  </tr>

  <tr>
    <td>screen</td>
    <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>
  </tr>

  <tr>
    <td>overlay</td>
    <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>
  </tr>

  <tr>
    <td>darken</td>
    <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>
  </tr>

  <tr>
    <td>lighten</td>
    <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>
  </tr>

  <tr>
    <td>linear-light</td>
    <td>Increase contrast slightly with an impact on the foreground's tonal values.</td>
  </tr>

  <tr>
    <td>color-dodge</td>
    <td>Brightens the destination color to reflect the source color. Painting with black produces no change.</td>
  </tr>

  <tr>
    <td>color-burn</td>
    <td>Darkens the destination color to reflect the source color.  Painting with white produces no change.</td>
  </tr>

  <tr>
    <td>hard-light</td>
    <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>
  </tr>

  <tr>
    <td>soft-light</td>
    <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>
  </tr>

  <tr>
    <td>plus</td>
    <td>The source is added to the destination and replaces the destination. This operator is useful for animating a dissolve between two images.</td>
  </tr>

  <tr>
    <td>add</td>
    <td>As per 'plus' but transparency data is treated as matte
        values. As such any transparent areas in either image remain
        transparent. </td>
  </tr>

  <tr>
    <td>minus</td>
    <td>Subtract the colors in the source image from the
        destination image. When transparency is involved, Opaque areas will be
        subtracted from any destination opaque areas. </td>
  </tr>

  <tr>
    <td>subtract</td>
    <td>Subtract the colors in the source image from the
        destination image. When transparency is involved transparent areas are
        subtracted, so only the opaque areas in the source remain opaque in
        the destination image. </td>
  </tr>

  <tr>
    <td>difference</td>
    <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>
  </tr>

  <tr>
    <td>exclusion</td>
    <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>
  </tr>

  <tr>
    <td>xor</td>
    <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>
  </tr>

  <tr>
    <td>copy-*</td>
    <td>Copy the specified channel in the source image to the
        same channel in the destination image.  If the channel specified in
        the source image does not exist, (which can only happen for methods,
        '<code>copy-opacity</code>' or '<code>copy-black</code>') then it is
        assumed that the source image is a special grayscale channel image
        of the values to be copied. </td>
    </tr>

  <tr>
    <td>change-mask</td>
    <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>
  </tr>
  </tbody>
</table></td>
  </tr>
  <tr>
    <td><a class="anchor" id="interline-spacing"></a>interline-spacing <var>pixels</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="interword-spacing"></a>interword-spacing <var>pixels</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="kerning"></a>kerning <var>pixels</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="line"></a>line <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="matte"></a>matte <var>x,y method</var></td>
    <td>Choose from these methods:
<pre class="highlight"><code>point
replace
floodfill
filltoborder
reset</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="offset"></a>offset <var>offset</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="opacity"></a>opacity <var>opacity</var></td>
    <td>Use percent (e.g. 50%).</td>
  </tr>
  <tr>
    <td><a class="anchor" id="path"></a>path <var>path</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="point"></a>point <var>x,y</var></td>
    <td></td>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="pop-clip-path"></a>pop clip-path</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="pop-defs"></a>pop defs</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="pop-gradient"></a>pop gradient</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="pop-graphic-context"></a>pop graphic-context</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="pop-pattern"></a>pop pattern</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="push"></a>push clip-path "<var>name</var>"</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="push-defs"></a>push defs</td>
    <td></td>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <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>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="push-graphic-context"></a>push graphic-context { "<var>id</var>" }</td>
    <td>the <em>id</em> is optional</td>
  </tr>
  <tr>
    <td><a class="anchor" id="push-pattern"></a>push pattern <var>id radial x,y width,height</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="rectangle"></a>rectangle <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="rotate"></a>rotate <var>angle</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="roundrectangle"></a>roundrectangle <var>x,y x<sub>1</sub>,y<sub>1</sub> width,height</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="scale"></a>scale <var>x,y</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="skewX"></a>skewX <var>angle</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="skewY"></a>skewX <var>angle</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stop-color"></a>stop-color <var>color offset</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke"></a>stroke <var>color</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-antialias"></a>stroke-antialias <var>0 • 1</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-dasharray"></a>stroke-dasharray <var>none • numeric-list</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-dashoffset"></a>stroke-dashoffset <var>offset</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-linecap"></a>stroke-linecap <var>type</var></td>
    <td>Choose from these cap types:
<pre class="highlight"><code>butt
round
square</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-linejoin"></a>stroke-linejoin <var>type</var></td>
    <td>Choose from these join types:
<pre class="highlight"><code>bevel
miter
round</code></pre></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-miterlimit"></a>stroke-miterlimit <var>limit</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-opacity"></a>stroke-opacity <var>opacity</var></td>
    <td>The opacity ranges from 0.0 (fully transparent) to 1.0 (fully opaque) or as a percentage (e.g. 50%).</td>
  </tr>
  <tr>
    <td><a class="anchor" id="stroke-width"></a>stroke-width <var>width</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="text"></a>text <var>"text"</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="text-antialias"></a>text-antialias <var>0 • 1</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="text-undercolor"></a>text-undercolor <var>color</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="translate"></a>translate <var>x,y</var></td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="use"></a>use "<var>url(#id)</var>"</td>
    <td></td>
  </tr>
  <tr>
    <td><a class="anchor" id="viewbox"></a>viewbox <var>x,y x<sub>1</sub>,y<sub>1</sub></var></td>
    <td></td>
  </tr>
</table></div>
</div>
    </div>
  </main><!-- /.container -->
  <footer class="magick-footer">
    <div class="container">
    <p><a href="security-policy.html">Security</a> •
    <a href="news.html">News</a>
     
    <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>
     
    <a href="links.html">Related</a> •
     <a href="sitemap.html">Sitemap</a>
    <br/>
    <a href="support.html">Sponsor</a> •
    <a href="cite.html">Cite</a> •
    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
    <a href="https://imagemagick.org/script/contact.php">Contact Us</a> 
    <br/>
    <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> •
        <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>
    <br/>
    <small>© 1999-2021 ImageMagick Studio LLC</small></p>
    <div>
  </footer>

  <!-- Javascript assets -->
  <script>window.jQuery || document.write('<script src="assets/jquery.slim.min.js"><\/script>')</script><script src="assets/bootstrap.bundle.min.js" integrity="sha384-LtrjvnR4Twt/qOuYxE721u19sVFLVSA4hf/rRt6PrZTmiPltdZcI7q7PXQBYTKyf" crossorigin="anonymous">
</body>
</html>
<!-- Magick Cache 1st January 2021 19:38 -->