File: Drawable.tex

package info (click to toggle)
imagemagick 6:6.0.6.2-2.9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 33,284 kB
  • ctags: 14,844
  • sloc: ansic: 190,790; cpp: 17,203; sh: 8,740; perl: 4,190; makefile: 1,740; tcl: 459
file content (955 lines) | stat: -rw-r--r-- 54,628 bytes parent folder | download
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
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
\section{Magick::Drawable}
\scriptsize{
\begin{verbatim}

Drawable provides a convenient interface for preparing vector, image, or
text arguments for the Image::draw() method. Each instance of a Drawable
sub-class represents a single drawable object. Drawable objects may be drawn
"one-by-one" via multiple invocations of the Image draw() method, or may be
drawn "all-at-once" by passing a list of Drawable objects to the Image
draw() method. The one-by-one approach is convenient for simple drawings,
while the list-based approach is appropriate for drawings which require more
sophistication.

The following is an example of using the Drawable subclasses with the
one-by-one approach to draw the following figure:

[Drawable_example_1.png]

#include <string>
#include <iostream>
#include <Magick++.h>

using namespace std;
using namespace Magick;

int main(int /*argc*/,char **/*argv*/)
{
  try {
    // Create base image (white image of 300 by 200 pixels)
    Image image( Geometry(300,200), Color("white") );

    // Set draw options
    image.strokeColor("red"); // Outline color
    image.fillColor("green"); // Fill color
    image.strokeWidth(5);

    // Draw a circle
    image.draw( DrawableCircle(100,100, 50,100) );

    // Draw a rectangle
    image.draw( DrawableRectangle(200,200, 270,170) );

    // Display the result
    image.display( );
  }
  catch( exception &error_ )
    {
      cout << "Caught exception: " << error_.what() << endl;
      return 1;
    }

  return 0;
}

Since Drawable is an object it may be saved in an array or a list for later
(perhaps repeated) use. The following example shows how to draw the same
figure using the list-based approach

#include <string>
#include <iostream>
#include <list>
#include <Magick++.h>

using namespace std;
using namespace Magick;

int main(int /*argc*/,char **/*argv*/)
{
  try {
    // Create base image (white image of 300 by 200 pixels)
    Image image( Geometry(300,200), Color("white") );

    // Construct drawing list
    std::list<Magick::Drawable> drawList;

    // Add some drawing options to drawing list
    drawList.push_back(DrawableStrokeColor("red")); // Outline color
    drawList.push_back(DrawableStrokeWidth(5)); // Stroke width
    drawList.push_back(DrawableFillColor("green")); // Fill color

    // Add a Circle to drawing list
    drawList.push_back(DrawableCircle(100,100, 50,100));

    // Add a Rectangle to drawing list
    drawList.push_back(DrawableRectangle(200,100, 270,170));

    // Draw everything using completed drawing list
    image.draw(drawList);

    // Display the result
    image.display( );
  }
  catch( exception &error_ )
    {
      cout << "Caught exception: " << error_.what() << endl;
      return 1;
    }

  return 0;
}

Drawable depends on the simple Coordinate structure which represents a pair
of x,y coodinates.  The methods provided by the Coordinate structure are
shown in the following table:

                        Coordinate Structure Methods

 Method/Member  Signature             Description

 Coordinate     void                  Default Constructor

                double x_, double y_  Constructor, setting first & second

 x              double x_             x coordinate member

 y              double y_             y coordinate member


The Drawable classes are shown in the following table:

                                    Drawable Classes

 Sub-Class                 Constructor Signature          Description

                           double sx_, double sy_, double Set scaling, rotation, and
 DrawableAffine            rx_, double ry_, double tx_,   translation (coordinate
                           double ty_                     transformation).

 DrawableAngle             double angle_                  Set drawing angle

                                                          Draw an arc using the stroke
                           double startX_, double         color and based on the circle
                                                          starting at coordinates
 DrawableArc               startY_, double endX_, double  startX_,startY_, and ending
                           endY_, double startDegrees,
                           double endDegrees_             with coordinates endX_,endY_,
                                                          and bounded by the rotational
                                                          arc startDegrees_,endDegrees_


                           const                          Draw a Bezier curve using the
 DrawableBezier            std::list<Magick::Coordinate>  stroke color and based on the
                           &coordinates_                  coordinates specified by the
                                                          coordinates_ list.

                                                          Draw a circle using the
                           double originX_, double        stroke color and thickness
 DrawableCircle            originY_, double perimX_,      using specified origin and
                           double perimY_                 perimeter coordinates. If a
                                                          fill color is specified, then
                                                          the object is filled.

                                                          Color image according to
                                                          paintMethod. The point method
                                                          recolors the target pixel.
                                                          The replace method recolors
                                                          any pixel that matches the
                                                          color of the target pixel.
 DrawableColor             double x_, double y_,          Floodfill recolors any pixel
                           PaintMethod paintMethod_       that matches the color of the
                                                          target pixel and is a
                                                          neighbor,  whereas
                                                          filltoborder recolors any
                                                          neighbor pixel that is not
                                                          the border color. Finally,
                                                          reset recolors all pixels.

                                                          Composite current image with
                                                          contents of specified image,
                                                          at specified coordinates. If
                                                          the matte attribute is set to
                                                          true, then the image
 DrawableCompositeImage    double x_, double y_, const    composition will consider an
                           std::string &filename_         alpha channel, or
                                                          transparency, present in the
                                                          image file so that non-opaque
                                                          portions allow part (or all)
                                                          of the composite image to
                                                          show through.


                           double x_, double y_, const
                           Image &image_

                                                          Composite current image with
                                                          contents of specified image,
                                                          rendered with specified width
                                                          and height, at specified
                                                          coordinates. If the matte
                                                          attribute is set to true,
                                                          then the image composition
                           double x_, double y_, double   will consider an alpha
                           width_, double height_, const  channel, or transparency,
                           std::string &filename_         present in the image file so
                                                          that non-opaque portions
                                                          allow part (or all) of the
                                                          composite image to show
                                                          through. If the specified
                                                          width or height is zero, then
                                                          the image is composited at
                                                          its natural size, without
                                                          enlargement or reduction.

                           double x_, double y_, double
                           width_, double height_, const
                           Image &image_

                                                          Composite current image with
                                                          contents of specified image,
                                                          rendered with specified width
                                                          and height, using specified
                                                          composition algorithm, at
                                                          specified coordinates. If the
                                                          matte attribute is set to
                                                          true, then the image
                           double x_, double y_, double   composition will consider an
                           width_, double height_, const  alpha channel, or
                           std::string &filename_,        transparency, present in the
                           CompositeOperator composition_ image file so that non-opaque
                                                          portions allow part (or all)
                                                          of the composite image to
                                                          show through. If the
                                                          specified width or height is
                                                          zero, then the image is
                                                          composited at its natural
                                                          size, without enlargement or
                                                          reduction.

                           double x_, double y_, double
                           width_, double height_, const
                           Image &image_,
                           CompositeOperator composition_


 DrawableTextDecoration    DecorationType decoration_     Specify decoration to apply
                                                          to text.

                                                          Specify the pattern of dashes
                                                          and gaps used to stroke
                                                          paths. The strokeDashArray
                                                          represents a zero-terminated
                                                          array of numbers that specify
                                                          the lengths of alternating
                                                          dashes and gaps in pixels. If
 DrawableDashArray         const unsigned int* dasharray_ an odd number of values is
                                                          provided, then the list of
                                                          values is repeated to yield
                                                          an even number of values.  A
                                                          typical strokeDashArray_
                                                          array might contain the
                                                          members 5 3 2 0, where the
                                                          zero value indicates the end
                                                          of the pattern array.

                                                          Specify the distance into the
                                                          dash pattern to start the
 DrawableDashOffset        unsigned int offset_           dash. See documentation on
                                                          SVG's stroke-dashoffset
                                                          property for usage details.

                                                          Draw an ellipse using the
                                                          stroke color and thickness,
                           double originX_, double        specified origin, x & y
 DrawableEllipse           originY_, double radiusX_,     radius, as well as specified
                           double radiusY_, double        start and end of arc in
                           arcStart_, double arcEnd_      degrees. If a fill color is
                                                          specified, then the object is
                                                          filled.


 DrawableFillColor         const Color &color_            Specify drawing object fill
                                                          color.

                                                          Specify the algorithm which
                                                          is to be used to determine
                                                          what parts of the canvas are
 DrawableFillRule          FillRule fillRule_             included inside the shape.
                                                          See documentation on SVG's
                                                          fill-rule  property for usage
                                                          details.


 DrawableFillOpacity       double opacity_                Specify opacity to use when
                                                          drawing using fill color.


 DrawableFont              const std::string &font_       Specify font name to use when
                                                          drawing text.

                                                          Specify font family, style,
                                                          weight (one of the set { 100
                                                          | 200 | 300 | 400 | 500 | 600
                                                          | 700 | 800 | 900 } with 400
                           const std::string &family_,    being the normal size), and
                                                          stretch to be used to select
                           StyleType style_,              the font used when drawing
                           unsigned long weight_,
                           StretchType stretch_           text. Wildcard matches may be
                                                          applied to style via the
                                                          AnyStyle enumeration, applied
                                                          to weight if weight is zero,
                                                          and applied to stretch via
                                                          the AnyStretch enumeration.


 DrawableGravity           GravityType gravity_           Specify text positioning
                                                          gravity.


                           double startX_, double         Draw a line using stroke
 DrawableLine              startY_, double endX_, double  color and thickness using
                           endY_                          starting and ending
                                                          coordinates

                                                          Change the pixel matte value
                                                          to transparent. The point
                                                          method changes the matte
                                                          value of the target pixel.
                                                          The replace method changes
                                                          the matte value of any pixel
                                                          that matches the color of the
                                                          target pixel. Floodfill
 DrawableMatte             double x_, double y_,          changes the matte value of
                           PaintMethod paintMethod_       any pixel that matches the
                                                          color of the target pixel and
                                                          is a neighbor, whereas
                                                          filltoborder changes the
                                                          matte value of any neighbor
                                                          pixel that is not the border
                                                          color, Finally reset changes
                                                          the matte value of all
                                                          pixels.

                                                          Specify miter limit. When two
                                                          line segments meet at a sharp
                                                          angle and miter joins have
                                                          been specified for
                                                          'lineJoin', it is possible
                                                          for the miter to extend far
 DrawableMiterLimit        unsigned int miterLimit_       beyond the thickness of the
                                                          line stroking the path. The
                                                          miterLimit' imposes a limit
                                                          on the ratio of the miter
                                                          length to the 'lineWidth'.
                                                          The default value of this
                                                          parameter is 4.


 DrawablePath              const std::list<Magick::VPath> Draw on image using vector
                           &path_                         path.

                                                          Draw a point using stroke
 DrawablePoint             double x_, double y_           color and thickness at
                                                          coordinate

 DrawablePointSize         double pointSize_              Set font point size.

                                                          Draw an arbitrary polygon
                                                          using stroke color and
                           const                          thickness consisting of three
 DrawablePolygon           std::list<Magick::Coordinate>  or more coordinates contained
                           &coordinates_                  in an STL list. If a fill
                                                          color is specified, then the
                                                          object is filled.

                                                          Draw an arbitrary polyline
                                                          using stroke color and
                           const                          thickness consisting of three
 DrawablePolyline          std::list<Magick::Coordinate>  or more coordinates contained
                           &coordinates_                  in an STL list. If a fill
                                                          color is specified, then the
                                                          object is filled.

                                                          Pop Graphic Context. Removing
                                                          the current graphic context
                                                          from the graphic context
 DrawablePopGraphicContext void                           stack restores the options to
                                                          the values they had prior to
                                                          the preceding
                                                          DrawablePushGraphicContext
                                                          operation.

                                                          Push Graphic Context.  When a
                                                          graphic context is pushed,
                                                          options set after the context
                                                          is pushed (such as coordinate
                                                          transformations, color
                                                          settings, etc.) are saved to
                                                          a new graphic context. This
                                                          allows related options to be
 DrawablePushGraphicContextvoid                           saved on a graphic context
                                                          "stack" in order to support
                                                          heirarchical nesting of
                                                          options. When
                                                          DrawablePopGraphicContext is
                                                          used to pop the current
                                                          graphic context, the options
                                                          in effect during the last
                                                          DrawablePushGraphicContext
                                                          operation are restored.

                                                          Start a pattern definition
                                                          with arbitrary pattern name
                                                          specified by id_, pattern
                                                          offset specified by x_ and
                                                          y_, and pattern size
                                                          specified by width_ and
                                                          height_. The pattern is
                                                          defined within the coordinate
                                                          system defined by the
                                                          specified offset and size.
                           std::string &id_, long x_,     Arbitrary drawing objects
 DrawablePushPattern       long y_, long width_, long     (including
                           height_                        DrawableCompositeImage) may
                                                          be specified between
                                                          DrawablePushPattern and
                                                          DrawablePopPattern in order
                                                          to draw the pattern. Normally
                                                          the pair
                                                          DrawablePushGraphicContext &
                                                          DrawablePopGraphicContext are
                                                          used to enclose a pattern
                                                          definition. Pattern
                                                          definitions are terminated by
                                                          a DrawablePopPattern object.

                                                          Terminate a pattern
 DrawablePopPattern        void                           definition started via
                                                          DrawablePushPattern.

                                                          Draw a rectangle using stroke
                           double upperLeftX_, double     color and thickness from
 DrawableRectangle         upperLeftY_, double            upper-left coordinates to
                           lowerRightX_, double           lower-right coordinates.  If
                           lowerRightY                    a fill color is specified,
                                                          then the object is filled.

                                                          Set rotation to use when
 DrawableRotation          double angle_                  drawing (coordinate
                                                          transformation).

                                                          Draw a rounded rectangle
                                                          using stroke color and
                           double centerX_, double        thickness, with specified
                           centerY_, double width_,       center coordinate, specified
 DrawableRoundRectangle    double hight_, double          width and height, and
                           cornerWidth_, double           specified corner width and
                           cornerHeight_                  height.  If a fill color is
                                                          specified, then the object is
                                                          filled.

                                                          Apply scaling in x and y
 DrawableScaling           double x_, double y_           direction while drawing
                                                          objects (coordinate
                                                          transformation).


 DrawableSkewX             double angle_                  Apply Skew in X direction
                                                          (coordinate transformation)

 DrawableSkewY             double angle_                  Apply Skew in Y direction


 DrawableStrokeAntialias   bool flag_                     Antialias while drawing lines
                                                          or object outlines.


 DrawableStrokeColor       const Color &color_            Set color to use when drawing
                                                          lines or object outlines.

                                                          Specify the shape to be used
                                                          at the end of open subpaths
 DrawableStrokeLineCap     LineCap linecap_               when they are stroked. Values
                                                          of LineCap are UndefinedCap,
                                                          ButtCap, RoundCap, and
                                                          SquareCap.

                                                          Specify the shape to be used
                                                          at the corners of paths (or
                                                          other vector shapes) when
 DrawableStrokeLineJoin    LineJoin linejoin_             they are stroked. Values of
                                                          LineJoin are UndefinedJoin,
                                                          MiterJoin, RoundJoin, and
                                                          BevelJoin.


 DrawableStrokeOpacity     double opacity_                Opacity to use when drawing
                                                          lines or object outlines.


 DrawableStrokeWidth       double width_                  Set width to use when drawing
                                                          lines or object outlines.

                                                          Annotate image with text
                                                          using stroke color, font,
                                                          font pointsize, and box color
                                                          (text background color), at
                                                          specified coordinates. If
 DrawableText              double x_, double y_,          text contains special format
                           std::string text_              characters the image
                                                          filename, type, width,
                                                          height, or other image
                                                          attributes may be
                                                          incorporated in the text (see
                                                          label()).


 DrawableTranslation       double x_, double y_           Apply coordinate translation
                                                          (set new coordinate origin).

 DrawableTextAntialias     bool flag_                     Antialias while drawing text.

                                                          Dimensions of the output
                                                          viewbox. If the image is to
                                                          be written to a vector format
                                                          (e.g. MVG or SVG), then a
                                                          DrawablePushGraphicContext()
                           unsigned long x1_, unsigned    object should be pushed to
 DrawableViewbox           long y1_, unsigned long x2_,   the head of the list,
                           unsigned long y2_              followed by a
                                                          DrawableViewbox() statement
                                                          to establish the output
                                                          canvas size. A matching
                                                          DrawablePopGraphicContext()
                                                          object should be pushed to
                                                          the tail of the list.




Vector Path Classes

The vector paths supported by Magick++ are based on those supported by the
SVG XML specification. Vector paths are not directly drawable, they must
first be supplied as a constructor argument to the DrawablePath class in
order to create a drawable object. The DrawablePath class effectively
creates a drawable compound component which may be replayed as desired. If
the drawable compound component consists only of vector path objects using
relative coordinates then the object may be positioned on the image by
preceding it with a DrawablePath which sets the current drawing coordinate.
Alternatively coordinate transforms may be used to translate the origin in
order to position the object, rotate it, skew it, or scale it.

The "moveto" commands

The "moveto" commands establish a new current point. The effect is as if the
"pen" were lifted and moved to a new location. A path data segment must
begin with either one of the "moveto" commands or one of the "arc" commands.
Subsequent "moveto" commands (i.e., when the "moveto" is not the first
command) represent the start of a new subpath:

                               Moveto Classes

 Sub-Class     Constructor Signature                Description

                                                    Start a new sub-path at
                                                    the given coordinate.
                                                    PathMovetoAbs indicates
                                                    that absolute
                                                    coordinates will
                                                    follow; PathMovetoRel
                                                    indicates that relative
                                                    coordinates will
                                                    follow. If a relative
 PathMovetoAbs const Magick::Coordinate             moveto appears as the
               &coordinate_                         first element of the
                                                    path, then it is
                                                    treated as a pair of
                                                    absolute coordinates.
                                                    If a moveto is followed
                                                    by multiple pairs of
                                                    coordinates, the
                                                    subsequent pairs are
                                                    treated as implicit
                                                    lineto commands.


               const std::list<Magick::Coordinate>
               &coordinates_


 PathMovetoRel const Magick::Coordinate
               &coordinate_


               const std::list<Magick::Coordinate>
               &coordinates_


The "closepath" command

The "closepath" command causes an automatic straight line to be drawn from
the current point to the initial point of the current subpath:

                              Closepath Classes

 Sub-Class     Constructor          Description
               Signature

                                    Close the current subpath by drawing a
                                    straight line from the current point to
 PathClosePath void                 current subpath's most recent starting
                                    point (usually, the most recent moveto
                                    point).


The "lineto" commands

The various "lineto" commands draw straight lines from the current point to
a new point:

                                Lineto Classes

 Sub-Class              Constructor Signature          Description

                                                       Draw a line from the
                                                       current point to the
                                                       given coordinate which
                                                       becomes the new current
                                                       point.  PathLinetoAbs
                                                       indicates that absolute
                                                       coordinates are used;
                                                       PathLinetoRel indicates
 PathLinetoAbs          const Magick::Coordinate&      that relative
                        coordinate_                    coordinates are used. A
                                                       number of coordinates
                                                       pairs may be specified
                                                       in a list to draw a
                                                       polyline. At the end of
                                                       the command, the new
                                                       current point is set to
                                                       the final set of
                                                       coordinates provided.

                        const
                        std::list<Magick::Coordinate>
                        &coordinates_


 PathLinetoRel          const Magick::Coordinate&
                        coordinate_

                        const
                        std::list<Magick::Coordinate>
                        &coordinates_

                                                       Draws a horizontal line
                                                       from the current point
                                                       (cpx, cpy) to (x, cpy).
                                                       PathLinetoHorizontalAbs
                                                       indicates that absolute
                                                       coordinates are
                                                       supplied;
 PathLinetoHorizontalAbsdouble x_                      PathLinetoHorizontalRel
                                                       indicates that relative
                                                       coordinates are
                                                       supplied. At the end of
                                                       the command, the new
                                                       current point becomes
                                                       (x, cpy) for the final
                                                       value of x.

                        PathLinetoHorizontalRel        double x_

                                                       Draws a vertical line
                                                       from the current point
                                                       (cpx, cpy) to (cpx, y).
                                                       PathLinetoVerticalAbs
                                                       indicates that absolute
                                                       coordinates are
                                                       supplied;
 PathLinetoVerticalAbs  double y_                      PathLinetoVerticalRel
                                                       indicates that relative
                                                       coordinates are
                                                       supplied.  At the end
                                                       of the command, the new
                                                       current point becomes
                                                       (cpx, y) for the final
                                                       value of y.

                        PathLinetoVerticalRel          double y_


The curve commands

These three groups of commands draw curves:

   * Cubic Bezier commands. A cubic Bezier segment is defined by a start
     point, an end point, and two control points.
   * Quadratic Bezier commands. A quadratic Bezier segment is defined by a
     start point, an end point, and one control point.
   * Elliptical arc commands. An elliptical arc segment draws a segment of
     an ellipse.

The cubic Bezier curve commands

The cubic Bezier commands depend on the PathCurvetoArgs argument class,
which has the constructor signature

  PathCurvetoArgs( double x1_, double y1_,
                   double x2_, double y2_,
                   double x_, double y_ );

The commands are as follows:

                          Cubic Bezier Curve Classes

 Sub-Class           Constructor Signature               Description

                                                         Draws a cubic Bezier
                                                         curve from the current
                                                         point to (x,y) using
                                                         (x1,y1) as the control
                                                         point at the beginning
                                                         of the curve and
                                                         (x2,y2) as the control
                                                         point at the end of
                                                         the curve.
                                                         PathCurvetoAbs
                                                         indicates that
                                                         absolutecoordinates
 PathCurvetoAbs      const Magick::PathCurvetoArgs       will follow;
                     &args_                              PathCurvetoRel
                                                         indicates that
                                                         relative coordinates
                                                         will follow. Multiple
                                                         sets of coordinates
                                                         may be specified to
                                                         draw a polyBezier. At
                                                         the end of the
                                                         command, the new
                                                         current point becomes
                                                         the final (x,y)
                                                         coordinate pair used
                                                         in the polyBezier.

                     const
                     std::list<Magick::PathCurvetoArgs>
                     &args_


 PathCurvetoRel      const Magick::PathCurvetoArgs
                     &args_

                     const
                     std::list<Magick::PathCurvetoArgs>
                     &args_

                                                         Draws a cubic Bezier
                                                         curve from the current
                                                         point to (x,y). The
                                                         first control point is
                                                         assumed to be the
                                                         reflection of the
                                                         second control point
                                                         on the previous
                                                         command relative to
                                                         the current point. (If
                                                         there is no previous
                                                         command or if the
                                                         previous command was
                                                         not an PathCurvetoAbs,
                                                         PathCurvetoRel,
                                                         PathSmoothCurvetoAbs
                                                         or
                                                         PathSmoothCurvetoRel,
                                                         assume the first
                                                         control point is
                                                         coincident with the
 PathSmoothCurvetoAbsconst Magick::Coordinate            current point.)
                     &coordinates_                       (x2,y2) is the second
                                                         control point (i.e.,
                                                         the control point at
                                                         the end of the
                                                         curve).
                                                         PathSmoothCurvetoAbs
                                                         indicates that
                                                         absolute coordinates
                                                         will follow;
                                                         PathSmoothCurvetoRel
                                                         indicates that
                                                         relative coordinates
                                                         will follow. Multiple
                                                         sets of coordinates
                                                         may be specified to
                                                         draw a polyBezier. At
                                                         the end of the
                                                         command, the new
                                                         current point becomes
                                                         the final (x,y)
                                                         coordinate pair used
                                                         in the polyBezier.


                     const std::list<Magick::Coordinate>
                     &coordinates_


 PathSmoothCurvetoRelconst Magick::Coordinate
                     &coordinates_


                     const std::list<Magick::Coordinate>
                     &coordinates_


The quadratic Bezier curve commands

The quadratic Bezier commands depend on the PathQuadraticCurvetoArgs
argument class, which has the constructor signature:

  PathQuadraticCurvetoArgs( double x1_, double y1_,
                            double x_, double y_ );

The quadratic Bezier commands are as follows:


                                      Quadratic Bezier Curve Classes

 Sub-Class                    Constructor Signature                        Description

                                                                           Draws a quadratic Bezier curve
                                                                           from the current point to
                                                                           (x,y) using (x1,y1) as the
                                                                           control point.
                                                                           PathQuadraticCurvetoAbs
                                                                           indicates that absolute
                                                                           coordinates will follow;
                                                                           PathQuadraticCurvetoRel
 PathQuadraticCurvetoAbs      const Magick::PathQuadraticCurvetoArgs       indicates that relative
                              &args_
                                                                           coordinates will follow.
                                                                           Multiple sets of coordinates
                                                                           may be specified to draw a
                                                                           polyBezier. At the end of the
                                                                           command, the new current point
                                                                           becomes the final (x,y)
                                                                           coordinate pair used in the
                                                                           polyBezier.

                              const
                              std::list<Magick::PathQuadraticCurvetoArgs>
                              &args_


 PathQuadraticCurvetoRel      const Magick::PathQuadraticCurvetoArgs
                              &args_

                              const
                              std::list<Magick::PathQuadraticCurvetoArgs>
                              &args_

                                                                           Draws a quadratic Bezier curve
                                                                           from the current point to
                                                                           (x,y). The control point is
                                                                           assumed to be the reflection
                                                                           of the control point on the
                                                                           previous
                                                                           command relative to the
                                                                           current point. (If there is no
                                                                           previous command or if the
                                                                           previous command was not a
                                                                           PathQuadraticCurvetoAbs,
                                                                           PathQuadraticCurvetoRel,
                                                                           PathSmoothQuadraticCurvetoAbs
 PathSmoothQuadraticCurvetoAbsconst Magick::Coordinate &coordinate_        or
                                                                           PathSmoothQuadraticCurvetoRel,
                                                                           assume the control point is
                                                                           coincident with the current
                                                                           point.)
                                                                           PathSmoothQuadraticCurvetoAbs
                                                                           indicates that absolute
                                                                           coordinates will follow;
                                                                           PathSmoothQuadraticCurvetoRel
                                                                           indicates that relative
                                                                           coordinates will follow. At
                                                                           the end of the command, the
                                                                           new current point becomes the
                                                                           final (x,y) coordinate pair
                                                                           used in the polyBezier.


                              const std::list<Magick::Coordinate>
                              &coordinates_

 PathSmoothQuadraticCurvetoRelconst Magick::Coordinate &coordinate_


                              const std::list<Magick::Coordinate>
                              &coordinates_


The elliptical arc curve commands

The elliptical arc curve commands depend on the PathArcArgs argument class,
which has the constructor signature:

   PathArcArgs( double radiusX_, double radiusY_,
                double xAxisRotation_, bool largeArcFlag_,
                bool sweepFlag_, double x_, double y_ );

The elliptical arc commands are as follows:

                        Elliptical Arc Curve Classes

 Sub-Class  Constructor Signature                  Description

                                                   Draws an elliptical arc
                                                   from the current point
                                                   to (x, y). The size and
                                                   orientation of the
                                                   ellipse are defined by
                                                   two radii (radiusX,
                                                   radiusY) and an
                                                   xAxisRotation, which
                                                   indicates how the
                                                   ellipse as a whole is
                                                   rotated relative to the
                                                   current coordinate
                                                   system. The center (cx,
                                                   cy) of the ellipse is
 PathArcAbs const Magick::PathArcArgs              calculated automatically
            &coordinates_                          to satisfy the
                                                   constraints imposed by
                                                   the other parameters.
                                                   largeArcFlag and
                                                   sweepFlag contribute to
                                                   the automatic
                                                   calculations and help
                                                   determine how the arc is
                                                   drawn. If largeArcFlag
                                                   is true then draw the
                                                   larger of the available
                                                   arcs. If sweepFlag is
                                                   true, then draw the arc
                                                   matching a clock-wise
                                                   rotation.


            const std::list<Magick::PathArcArgs>
            &coordinates_


 PathArcRel const Magick::PathArcArgs
            &coordinates_


            const std::list<Magick::PathArcArgs>
            &coordinates_




\end{verbatim}
}