1// This may look like C code, but it is really -*- C++ -*-
2//
3// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
4// Copyright Dirk Lemstra 2014-2015
5//
6// Definition of Drawable (Graphic objects)
7//
8// The technique used for instantiating classes which derive from STL
9// templates is described in Microsoft MSDN Article ID: Q168958
10// "HOWTO: Exporting STL Components Inside & Outside of a Class".
11// "http://support.microsoft.com/kb/168958"
12//
13// Note that version 3.0 of this article says that that only STL
14// container template which supports DLL export is <vector> and we are
15// not using <vector> as part of the Drawable implementation.
16//
17
18#if !defined(Magick_Drawable_header)
19#define Magick_Drawable_header
20
21#include "Magick++/Include.h"
22
23#include <functional>
24#include <string>
25#include <vector>
26#include <utility>
27#include "Magick++/Color.h"
28#include "Magick++/Geometry.h"
29
30#if defined(MagickDLLExplicitTemplate)
31#  if defined(MAGICK_PLUSPLUS_IMPLEMENTATION)
32#    define MagickDrawableExtern
33#  else
34#   pragma warning( disable: 4231 ) // Disable warning regarding using extern
35#    define MagickDrawableExtern extern
36#  endif // MAGICK_PLUSPLUS_IMPLEMENTATION
37#else
38#  define MagickDrawableExtern
39#endif // MagickDLLExplicitTemplate
40
41namespace Magick
42{
43  //
44  // Representation of an x,y coordinate
45  //
46  class MagickPPExport Coordinate
47  {
48  public:
49
50    Coordinate(void)
51      : _x(0),
52        _y(0) {}
53
54    Coordinate(double x_,double y_)
55      : _x(x_),
56        _y(y_) {}
57
58    virtual ~Coordinate() {}
59
60    void x(double x_) { _x=x_; }
61    double x(void) const { return _x; }
62
63    void y(double y_) { _y=y_; }
64    double y(void) const { return _y; }
65
66  private:
67    double _x;
68    double _y;
69  };
70
71  typedef std::vector<Magick::Coordinate> CoordinateList;
72
73#if defined(MagickDLLExplicitTemplate)
74
75  MagickDrawableExtern template class MagickPPExport
76  std::allocator<Magick::Coordinate>;
77
78#endif // MagickDLLExplicitTemplate
79
80  // Compare two Coordinate objects regardless of LHS/RHS
81  extern MagickPPExport int operator ==
82    (const Coordinate& left_,const Coordinate& right_);
83  extern MagickPPExport int operator !=
84    (const Coordinate& left_, const Coordinate& right_);
85  extern MagickPPExport int operator >
86    (const Coordinate& left_, const Coordinate& right_);
87  extern MagickPPExport int operator <
88    (const Coordinate& left_, const Coordinate& right_);
89  extern MagickPPExport int operator >=
90    (const Coordinate& left_, const Coordinate& right_);
91  extern MagickPPExport int operator <=
92    (const Coordinate& left_, const Coordinate& right_);
93
94  //
95  // Base class for all drawable objects
96  //
97  class MagickPPExport DrawableBase:
98    public std::unary_function<MagickCore::DrawingWand,void>
99  {
100  public:
101
102    // Default constructor
103    DrawableBase(void);
104
105    // Destructor
106    virtual ~DrawableBase(void);
107
108    // Operator to invoke equivalent draw API call
109    virtual void operator()(MagickCore::DrawingWand *) const;
110
111    // Return polymorphic copy of object
112    virtual DrawableBase* copy() const;
113  };
114
115  //
116  // Representation of a drawable surrogate object to manage drawable objects
117  //
118  #undef Drawable // Conflict with <X11/Xproto.h>
119  class MagickPPExport Drawable
120  {
121  public:
122
123    // Default constructor
124    Drawable(void);
125
126    // Construct from DrawableBase
127    Drawable(const DrawableBase& original_);
128
129    // Destructor
130    ~Drawable(void);
131
132    // Copy constructor
133    Drawable(const Drawable& original_);
134
135    // Assignment operator
136    Drawable& operator=(const Drawable& original_);
137
138    // Operator to invoke contained object
139    void operator()(MagickCore::DrawingWand *) const;
140
141  private:
142    DrawableBase* dp;
143  };
144
145  typedef std::vector<Magick::Drawable> DrawableList;
146
147#if defined(MagickDLLExplicitTemplate)
148
149  MagickDrawableExtern template class MagickPPExport
150  std::allocator<Magick::Drawable>;
151
152#endif // MagickDLLExplicitTemplate
153
154//
155// Base class for all drawable path elements for use with
156// DrawablePath
157//
158class MagickPPExport VPathBase
159{
160public:
161  // Constructor
162  VPathBase ( void )
163    { }
164
165  // Destructor
166  virtual ~VPathBase ( void );
167
168  // Assignment operator
169  //    const VPathBase& operator= (const VPathBase& original_ );
170
171  // Operator to invoke equivalent draw API call
172  virtual void operator()( MagickCore::DrawingWand *context_ ) const = 0;
173
174  // Return polymorphic copy of object
175  virtual VPathBase* copy() const = 0;
176};
177
178//
179// Representation of a drawable path element surrogate object to
180// manage drawable path elements so they may be passed as a list to
181// DrawablePath.
182//
183class MagickPPExport VPath
184{
185public:
186  // Constructor
187  VPath ( void );
188
189  // Construct from VPathBase
190  VPath ( const VPathBase& original_ );
191
192  // Destructor
193  virtual ~VPath ( void );
194
195  // Copy constructor
196  VPath ( const VPath& original_ );
197
198  // Assignment operator
199  VPath& operator= (const VPath& original_ );
200
201  // Operator to invoke contained object
202  void operator()( MagickCore::DrawingWand *context_ ) const;
203
204private:
205  VPathBase* dp;
206};
207
208// Compare two VPath objects regardless of LHS/RHS
209extern MagickPPExport int operator == ( const VPath& left_,
210                                      const VPath& right_ );
211extern MagickPPExport int operator != ( const VPath& left_,
212                                      const VPath& right_ );
213extern MagickPPExport int operator >  ( const VPath& left_,
214                                      const VPath& right_ );
215extern MagickPPExport int operator <  ( const VPath& left_,
216                                      const VPath& right_ );
217extern MagickPPExport int operator >= ( const VPath& left_,
218                                      const VPath& right_ );
219extern MagickPPExport int operator <= ( const VPath& left_,
220                                      const VPath& right_ );
221
222typedef std::vector<Magick::VPath> VPathList;
223
224#if defined(MagickDLLExplicitTemplate)
225
226MagickDrawableExtern template class MagickPPExport
227std::allocator<Magick::VPath>;
228
229// MagickDrawableExtern template class MagickPPExport
230// std::vector<Magick::VPath, std::allocator<Magick::VPath> >;
231
232#endif // MagickDLLExplicitTemplate
233
234//
235// Drawable Objects
236//
237
238// Affine (scaling, rotation, and translation)
239class MagickPPExport DrawableAffine  : public DrawableBase
240{
241public:
242  DrawableAffine ( double sx_, double sy_,
243                   double rx_, double ry_,
244                   double tx_, double ty_ );
245
246  DrawableAffine ( void );
247
248  /*virtual*/ ~DrawableAffine( void );
249
250  // Operator to invoke equivalent draw API call
251  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
252
253  // Return polymorphic copy of object
254  /*virtual*/
255  DrawableBase* copy() const;
256
257  void sx( const double sx_ )
258    {
259      _affine.sx = sx_;
260    }
261  double sx( void ) const
262    {
263      return _affine.sx;
264    }
265
266  void sy( const double sy_ )
267    {
268      _affine.sy = sy_;
269    }
270  double sy( void ) const
271    {
272      return _affine.sy;
273    }
274
275  void rx( const double rx_ )
276    {
277      _affine.rx = rx_;
278    }
279  double rx( void ) const
280    {
281      return _affine.rx;
282    }
283
284  void ry( const double ry_ )
285    {
286      _affine.ry = ry_;
287    }
288  double ry( void ) const
289    {
290      return _affine.ry;
291    }
292
293  void tx( const double tx_ )
294    {
295      _affine.tx = tx_;
296    }
297  double tx( void ) const
298    {
299      return _affine.tx;
300    }
301
302  void ty( const double ty_ )
303    {
304      _affine.ty = ty_;
305    }
306  double ty( void ) const
307    {
308      return _affine.ty;
309    }
310
311private:
312  MagickCore::AffineMatrix  _affine;
313};
314
315// Change pixel alpha value to transparent using PaintMethod
316class MagickPPExport DrawableAlpha : public DrawableBase
317{
318public:
319
320    DrawableAlpha(double x_, double y_,PaintMethod paintMethod_)
321      : _x(x_),
322        _y(y_),
323        _paintMethod(paintMethod_)
324    {
325    }
326
327    ~DrawableAlpha(void);
328
329    // Operator to invoke equivalent draw API call
330    void operator()(MagickCore::DrawingWand *context_) const;
331
332    // Return polymorphic copy of object
333    DrawableBase* copy() const;
334
335    void x(double x_)
336    {
337      _x=x_;
338    }
339
340    double x(void) const
341    {
342      return(_x);
343    }
344
345    void y(double y_)
346    {
347      _y=y_;
348    }
349
350    double y(void) const
351    {
352      return(_y);
353    }
354
355    void paintMethod(PaintMethod paintMethod_)
356    {
357      _paintMethod=paintMethod_;
358    }
359
360    PaintMethod paintMethod(void) const
361    {
362      return(_paintMethod);
363    }
364
365  private:
366
367    double _x;
368    double _y;
369    PaintMethod _paintMethod;
370};
371
372// Arc
373class MagickPPExport DrawableArc : public DrawableBase
374{
375public:
376  DrawableArc ( double startX_, double startY_,
377                double endX_, double endY_,
378                double startDegrees_, double endDegrees_ )
379    : _startX(startX_),
380      _startY(startY_),
381      _endX(endX_),
382      _endY(endY_),
383      _startDegrees(startDegrees_),
384      _endDegrees(endDegrees_)
385    { }
386
387  /*virtual*/ ~DrawableArc( void );
388
389  // Operator to invoke equivalent draw API call
390  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
391
392  // Return polymorphic copy of object
393  /*virtual*/ DrawableBase* copy() const;
394
395  void startX( double startX_ )
396    {
397      _startX = startX_;
398    }
399  double startX( void ) const
400    {
401      return _startX;
402    }
403
404  void startY( double startY_ )
405    {
406      _startY = startY_;
407    }
408  double startY( void ) const
409    {
410      return _startY;
411    }
412
413  void endX( double endX_ )
414    {
415      _endX = endX_;
416    }
417  double endX( void ) const
418    {
419      return _endX;
420    }
421
422  void endY( double endY_ )
423    {
424      _endY = endY_;
425    }
426  double endY( void ) const
427    {
428      return _endY;
429    }
430
431  void startDegrees( double startDegrees_ )
432    {
433      _startDegrees = startDegrees_;
434    }
435  double startDegrees( void ) const
436    {
437      return _startDegrees;
438    }
439
440  void endDegrees( double endDegrees_ )
441    {
442      _endDegrees = endDegrees_;
443    }
444  double endDegrees( void ) const
445    {
446      return _endDegrees;
447    }
448
449private:
450  double _startX;
451  double _startY;
452  double _endX;
453  double _endY;
454  double _startDegrees;
455  double _endDegrees;
456};
457
458// Bezier curve (Coordinate list must contain at least three members)
459class MagickPPExport DrawableBezier : public DrawableBase
460{
461public:
462  // Construct from coordinates
463  DrawableBezier ( const CoordinateList &coordinates_ );
464
465  // Copy constructor
466  DrawableBezier ( const DrawableBezier& original_ );
467
468  // Destructor
469  /*virtual*/ ~DrawableBezier ( void );
470
471  // Operator to invoke equivalent draw API call
472  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
473
474  // Return polymorphic copy of object
475  /*virtual*/ DrawableBase* copy() const;
476
477private:
478  CoordinateList _coordinates;
479};
480
481  // Sets the border color to be used for drawing bordered objects.
482  class MagickPPExport DrawableBorderColor : public DrawableBase
483  {
484  public:
485
486    DrawableBorderColor(const Color &color_);
487
488    DrawableBorderColor(const DrawableBorderColor &original_);
489
490    ~DrawableBorderColor(void);
491
492    // Operator to invoke equivalent draw API call
493    void operator()(MagickCore::DrawingWand *context_) const;
494
495    void color(const Color &color_);
496    Color color(void) const;
497
498    // Return polymorphic copy of object
499    DrawableBase* copy() const;
500
501  private:
502    Color _color;
503  };
504
505  // Sets the polygon fill rule to be used by the clipping path.
506  class MagickPPExport DrawableClipRule : public DrawableBase
507  {
508  public:
509
510    DrawableClipRule(const FillRule fillRule_);
511
512    ~DrawableClipRule(void);
513
514    // Operator to invoke equivalent draw API call
515    void operator()(MagickCore::DrawingWand *context_) const;
516
517    void fillRule(const FillRule fillRule_);
518    FillRule fillRule(void) const;
519
520    // Return polymorphic copy of object
521    DrawableBase* copy() const;
522
523  private:
524    FillRule _fillRule;
525  };
526
527  // Sets the interpretation of clip path units.
528  class MagickPPExport DrawableClipUnits : public DrawableBase
529  {
530  public:
531
532    DrawableClipUnits(const ClipPathUnits units_);
533
534    ~DrawableClipUnits(void);
535
536    // Operator to invoke equivalent draw API call
537    void operator()(MagickCore::DrawingWand *context_) const;
538
539    void units(const ClipPathUnits units_);
540    ClipPathUnits units(void) const;
541
542    // Return polymorphic copy of object
543    DrawableBase* copy() const;
544
545  private:
546    ClipPathUnits _units;
547  };
548
549// Pop (terminate) clip path definition
550class MagickPPExport DrawablePopClipPath : public DrawableBase
551{
552public:
553  DrawablePopClipPath ( void )
554    : _dummy(0)
555    {
556    }
557
558  /*virtual*/ ~DrawablePopClipPath ( void );
559
560  // Operator to invoke equivalent draw API call
561  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
562
563  // Return polymorphic copy of object
564  /*virtual*/ DrawableBase* copy() const;
565
566private:
567  ::ssize_t   _dummy;
568};
569
570// Push (create) Clip path definition
571class MagickPPExport DrawablePushClipPath : public DrawableBase
572{
573public:
574  DrawablePushClipPath ( const std::string &id_);
575
576  DrawablePushClipPath ( const DrawablePushClipPath& original_ );
577
578  /*virtual*/ ~DrawablePushClipPath ( void );
579
580  // Operator to invoke equivalent draw API call
581  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
582
583  // Return polymorphic copy of object
584  /*virtual*/ DrawableBase* copy() const;
585
586private:
587  std::string _id;
588};
589
590// Named Clip Path
591class MagickPPExport DrawableClipPath : public DrawableBase
592{
593public:
594  DrawableClipPath ( const std::string &id_ );
595  DrawableClipPath ( const DrawableClipPath& original_ );
596
597  /*virtual*/ ~DrawableClipPath ( void );
598
599  // Operator to invoke equivalent draw API call
600  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
601
602  // Return polymorphic copy of object
603  /*virtual*/ DrawableBase* copy() const;
604
605  void clip_path( const std::string &id_ )
606    {
607      _id = id_.c_str(); //multithread safe
608    }
609  std::string clip_path( void ) const
610    {
611      return _id;
612    }
613
614private:
615  std::string   _id;
616};
617
618// Circle
619class MagickPPExport DrawableCircle : public DrawableBase
620{
621public:
622  DrawableCircle ( double originX_, double originY_,
623                   double perimX_, double perimY_ )
624    : _originX(originX_),
625      _originY(originY_),
626      _perimX(perimX_),
627      _perimY(perimY_)
628    {
629    }
630
631  /*virtual*/ ~DrawableCircle ( void );
632
633  // Operator to invoke equivalent draw API call
634  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
635
636  // Return polymorphic copy of object
637  /*virtual*/ DrawableBase* copy() const;
638
639  void originX( double originX_ )
640    {
641      _originX = originX_;
642    }
643  double originX( void ) const
644    {
645      return _originX;
646    }
647
648  void originY( double originY_ )
649    {
650      _originY = originY_;
651    }
652  double originY( void ) const
653    {
654      return _originY;
655    }
656
657  void perimX( double perimX_ )
658    {
659      _perimX = perimX_;
660    }
661  double perimX( void ) const
662    {
663      return _perimX;
664    }
665
666  void perimY( double perimY_ )
667    {
668      _perimY = perimY_;
669    }
670  double perimY( void ) const
671    {
672      return _perimY;
673    }
674
675private:
676  double _originX;
677  double _originY;
678  double _perimX;
679  double _perimY;
680};
681
682// Colorize at point using PaintMethod
683class MagickPPExport DrawableColor : public DrawableBase
684{
685public:
686  DrawableColor ( double x_, double y_,
687                  PaintMethod paintMethod_ )
688    : _x(x_),
689      _y(y_),
690      _paintMethod(paintMethod_)
691    { }
692
693  /*virtual*/ ~DrawableColor ( void );
694
695  // Operator to invoke equivalent draw API call
696  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
697
698  // Return polymorphic copy of object
699  /*virtual*/ DrawableBase* copy() const;
700
701  void x( double x_ )
702    {
703      _x = x_;
704    }
705  double x( void ) const
706    {
707      return _x;
708    }
709
710  void y( double y_ )
711    {
712      _y = y_;
713    }
714  double y( void ) const
715    {
716      return _y;
717    }
718
719  void paintMethod( PaintMethod paintMethod_ )
720    {
721      _paintMethod = paintMethod_;
722    }
723  PaintMethod paintMethod( void ) const
724    {
725      return _paintMethod;
726    }
727
728private:
729  double _x;
730  double _y;
731  PaintMethod _paintMethod;
732};
733
734// Draw image at point, scaled to size specified by width and height
735class MagickPPExport Image;
736class MagickPPExport DrawableCompositeImage : public DrawableBase
737{
738public:
739  DrawableCompositeImage ( double x_, double y_,
740                           const std::string &filename_ );
741
742  DrawableCompositeImage ( double x_, double y_,
743                           const Image &image_ );
744
745  DrawableCompositeImage ( double x_, double y_,
746                           double width_, double height_,
747                           const std::string &filename_ );
748
749  DrawableCompositeImage ( double x_, double y_,
750                           double width_, double height_,
751                           const Image &image_ );
752
753  DrawableCompositeImage ( double x_, double y_,
754                           double width_, double height_,
755                           const std::string &filename_,
756                           CompositeOperator composition_ );
757
758  DrawableCompositeImage ( double x_, double y_,
759                           double width_, double height_,
760                           const Image &image_,
761                           CompositeOperator composition_ );
762
763  // Copy constructor
764  DrawableCompositeImage ( const DrawableCompositeImage& original_ );
765
766  // Destructor
767  /*virtual*/ ~DrawableCompositeImage( void );
768
769  // Assignment operator
770  DrawableCompositeImage& operator=
771  (const DrawableCompositeImage& original_ );
772
773  // Operator to invoke equivalent draw API call
774  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
775
776  // Return polymorphic copy of object
777  /*virtual*/ DrawableBase* copy() const;
778
779  void composition( CompositeOperator composition_ )
780    {
781      _composition = composition_;
782    }
783  CompositeOperator composition( void ) const
784    {
785      return _composition;
786    }
787
788  void filename( const std::string &image_ );
789  std::string filename( void ) const;
790
791  void x( double x_ )
792    {
793      _x = x_;
794    }
795  double x( void ) const
796    {
797      return _x;
798    }
799
800  void y( double y_ )
801    {
802      _y = y_;
803    }
804  double y( void ) const
805    {
806      return _y;
807    }
808
809  void width( double width_ )
810    {
811      _width = width_;
812    }
813  double width( void ) const
814    {
815      return _width;
816    }
817
818  void height( double height_ )
819    {
820      _height = height_;
821    }
822  double height( void ) const
823    {
824      return _height;
825    }
826
827  void image( const Image &image_ );
828  Magick::Image image( void ) const;
829
830  // Specify image format used to output Base64 inlined image data.
831  void magick( std::string magick_ );
832  std::string magick( void );
833
834private:
835  CompositeOperator  _composition;
836  double             _x;
837  double             _y;
838  double             _width;
839  double             _height;
840  Image*             _image;
841};
842
843// Density
844class MagickPPExport DrawableDensity : public DrawableBase
845{
846public:
847
848  DrawableDensity(const Point &density_);
849
850  DrawableDensity(const std::string &density_);
851
852  ~DrawableDensity(void);
853
854  void operator()(MagickCore::DrawingWand *context_) const;
855
856  DrawableBase* copy() const;
857
858private:
859  std::string _density;
860};
861
862// Ellipse
863class MagickPPExport DrawableEllipse : public DrawableBase
864{
865public:
866  DrawableEllipse ( double originX_, double originY_,
867                    double radiusX_, double radiusY_,
868                    double arcStart_, double arcEnd_ )
869    : _originX(originX_),
870      _originY(originY_),
871      _radiusX(radiusX_),
872      _radiusY(radiusY_),
873      _arcStart(arcStart_),
874      _arcEnd(arcEnd_)
875    { }
876
877  /*virtual*/ ~DrawableEllipse( void );
878
879  // Operator to invoke equivalent draw API call
880  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
881
882  // Return polymorphic copy of object
883  /*virtual*/ DrawableBase* copy() const;
884
885  void originX( double originX_ )
886    {
887      _originX = originX_;
888    }
889  double originX( void ) const
890    {
891      return _originX;
892    }
893
894  void originY( double originY_ )
895    {
896      _originY = originY_;
897    }
898  double originY( void ) const
899    {
900      return _originY;
901    }
902
903  void radiusX( double radiusX_ )
904    {
905      _radiusX = radiusX_;
906    }
907  double radiusX( void ) const
908    {
909      return _radiusX;
910    }
911
912  void radiusY( double radiusY_ )
913    {
914      _radiusY = radiusY_;
915    }
916  double radiusY( void ) const
917    {
918      return _radiusY;
919    }
920
921  void arcStart( double arcStart_ )
922    {
923      _arcStart = arcStart_;
924    }
925  double arcStart( void ) const
926    {
927      return _arcStart;
928    }
929
930  void arcEnd( double arcEnd_ )
931    {
932      _arcEnd = arcEnd_;
933    }
934  double arcEnd( void ) const
935    {
936      return _arcEnd;
937    }
938
939private:
940  double _originX;
941  double _originY;
942  double _radiusX;
943  double _radiusY;
944  double _arcStart;
945  double _arcEnd;
946};
947
948// Specify drawing fill color
949class MagickPPExport DrawableFillColor : public DrawableBase
950{
951public:
952  DrawableFillColor ( const Color &color_ );
953
954  DrawableFillColor ( const DrawableFillColor& original_ );
955
956  /*virtual*/ ~DrawableFillColor( void );
957
958  // Operator to invoke equivalent draw API call
959  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
960
961  // Return polymorphic copy of object
962  /*virtual*/ DrawableBase* copy() const;
963
964  void color( const Color &color_ )
965    {
966      _color = color_;
967    }
968  Color color( void ) const
969    {
970      return _color;
971    }
972
973private:
974  Color _color;
975};
976
977  // Sets the URL to use as a fill pattern for filling objects. Only local
978  // URLs("#identifier") are supported at this time. These local URLs are
979  // normally created by defining a named fill pattern with
980  // DrawablePushPattern/DrawablePopPattern.
981  class MagickPPExport DrawableFillPatternUrl : public DrawableBase
982  {
983  public:
984
985    DrawableFillPatternUrl(const std::string &url_);
986
987    ~DrawableFillPatternUrl(void);
988
989    DrawableFillPatternUrl(const DrawableFillPatternUrl& original_);
990
991    // Operator to invoke equivalent draw API call
992    void operator()(MagickCore::DrawingWand *context_) const;
993
994    void url(const std::string &url_);
995    std::string url(void) const;
996
997    // Return polymorphic copy of object
998    DrawableBase* copy() const;
999
1000  private:
1001    std::string _url;
1002  };
1003
1004// Specify fill rule (fill-rule)
1005class MagickPPExport DrawableFillRule : public DrawableBase
1006{
1007public:
1008  DrawableFillRule ( const FillRule fillRule_ )
1009    : _fillRule(fillRule_)
1010    {
1011    }
1012
1013  /*virtual*/ ~DrawableFillRule ( void );
1014
1015  // Operator to invoke equivalent draw API call
1016  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1017
1018  // Return polymorphic copy of object
1019  /*virtual*/ DrawableBase* copy() const;
1020
1021  void fillRule( const FillRule fillRule_ )
1022    {
1023      _fillRule = fillRule_;
1024    }
1025  FillRule fillRule( void ) const
1026    {
1027      return _fillRule;
1028    }
1029
1030private:
1031  FillRule _fillRule;
1032};
1033
1034// Specify drawing fill alpha
1035class MagickPPExport DrawableFillOpacity : public DrawableBase
1036{
1037public:
1038
1039  DrawableFillOpacity(double opacity_)
1040    : _opacity(opacity_)
1041  {
1042  }
1043
1044  ~DrawableFillOpacity ( void );
1045
1046  // Operator to invoke equivalent draw API call
1047  void operator()(MagickCore::DrawingWand *context_) const;
1048
1049  // Return polymorphic copy of object
1050  DrawableBase* copy() const;
1051
1052  void opacity(double opacity_)
1053  {
1054    _opacity=opacity_;
1055  }
1056
1057  double opacity(void) const
1058  {
1059    return(_opacity);
1060  }
1061
1062private:
1063  double _opacity;
1064};
1065
1066// Specify text font
1067class MagickPPExport DrawableFont : public DrawableBase
1068{
1069public:
1070  DrawableFont ( const std::string &font_ );
1071
1072  DrawableFont ( const std::string &family_,
1073                 StyleType style_,
1074                 const unsigned int weight_,
1075                 StretchType stretch_ );
1076  DrawableFont ( const DrawableFont& original_ );
1077
1078  /*virtual*/ ~DrawableFont ( void );
1079
1080  // Operator to invoke equivalent draw API call
1081  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1082
1083  // Return polymorphic copy of object
1084  /*virtual*/ DrawableBase* copy() const;
1085
1086  void font( const std::string &font_ )
1087    {
1088      _font = font_;
1089    }
1090  std::string font( void ) const
1091    {
1092      return _font;
1093    }
1094
1095private:
1096  std::string   _font;
1097  std::string   _family;
1098  StyleType     _style;
1099  unsigned int _weight;
1100  StretchType   _stretch;
1101};
1102
1103// Specify text positioning gravity
1104class MagickPPExport DrawableGravity : public DrawableBase
1105{
1106public:
1107  DrawableGravity ( GravityType gravity_ )
1108    : _gravity(gravity_)
1109    {
1110    }
1111
1112  /*virtual*/ ~DrawableGravity ( void );
1113
1114  // Operator to invoke equivalent draw API call
1115  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1116
1117  // Return polymorphic copy of object
1118  /*virtual*/ DrawableBase* copy() const;
1119
1120  void gravity( GravityType gravity_ )
1121    {
1122      _gravity = gravity_;
1123    }
1124  GravityType gravity( void ) const
1125    {
1126      return _gravity;
1127    }
1128
1129private:
1130  GravityType _gravity;
1131};
1132
1133// Line
1134class MagickPPExport DrawableLine : public DrawableBase
1135{
1136public:
1137  DrawableLine ( double startX_, double startY_,
1138                 double endX_, double endY_ )
1139    : _startX(startX_),
1140      _startY(startY_),
1141      _endX(endX_),
1142      _endY(endY_)
1143    { }
1144
1145  /*virtual*/ ~DrawableLine ( void );
1146
1147  // Operator to invoke equivalent draw API call
1148  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1149
1150  // Return polymorphic copy of object
1151  /*virtual*/ DrawableBase* copy() const;
1152
1153  void startX( double startX_ )
1154    {
1155      _startX = startX_;
1156    }
1157  double startX( void ) const
1158    {
1159      return _startX;
1160    }
1161
1162  void startY( double startY_ )
1163    {
1164      _startY = startY_;
1165    }
1166  double startY( void ) const
1167    {
1168      return _startY;
1169    }
1170
1171  void endX( double endX_ )
1172    {
1173      _endX = endX_;
1174    }
1175  double endX( void ) const
1176    {
1177      return _endX;
1178    }
1179
1180  void endY( double endY_ )
1181    {
1182      _endY = endY_;
1183    }
1184  double endY( void ) const
1185    {
1186      return _endY;
1187    }
1188
1189private:
1190  double _startX;
1191  double _startY;
1192  double _endX;
1193  double _endY;
1194};
1195
1196// Drawable Path
1197class MagickPPExport DrawablePath : public DrawableBase
1198{
1199public:
1200  DrawablePath ( const VPathList &path_ );
1201
1202  DrawablePath ( const DrawablePath& original_ );
1203
1204  /*virtual*/ ~DrawablePath ( void );
1205
1206  // Operator to invoke equivalent draw API call
1207  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1208
1209  // Return polymorphic copy of object
1210  /*virtual*/ DrawableBase* copy() const;
1211
1212private:
1213  VPathList _path;
1214};
1215
1216// Point
1217class MagickPPExport DrawablePoint : public DrawableBase
1218{
1219public:
1220  DrawablePoint ( double x_, double y_ )
1221    : _x(x_),
1222      _y(y_)
1223    { }
1224
1225  /*virtual*/ ~DrawablePoint ( void );
1226
1227  // Operator to invoke equivalent draw API call
1228  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1229
1230  // Return polymorphic copy of object
1231  /*virtual*/ DrawableBase* copy() const;
1232
1233  void x( double x_ )
1234    {
1235      _x = x_;
1236    }
1237  double x( void ) const
1238    {
1239      return _x;
1240    }
1241
1242  void y( double y_ )
1243    {
1244      _y = y_;
1245    }
1246  double y( void ) const
1247    {
1248      return _y;
1249    }
1250
1251private:
1252  double _x;
1253  double _y;
1254};
1255
1256// Text pointsize
1257class MagickPPExport DrawablePointSize : public DrawableBase
1258{
1259public:
1260  DrawablePointSize ( double pointSize_ )
1261    : _pointSize(pointSize_)
1262    { }
1263
1264  /*virtual*/ ~DrawablePointSize ( void );
1265
1266  // Operator to invoke equivalent draw API call
1267  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1268
1269  // Return polymorphic copy of object
1270  /*virtual*/ DrawableBase* copy() const;
1271
1272  void pointSize( double pointSize_ )
1273    {
1274      _pointSize = pointSize_;
1275    }
1276  double pointSize( void ) const
1277    {
1278      return _pointSize;
1279    }
1280
1281private:
1282  double _pointSize;
1283};
1284
1285// Polygon (Coordinate list must contain at least three members)
1286class MagickPPExport DrawablePolygon : public DrawableBase
1287{
1288public:
1289  DrawablePolygon ( const CoordinateList &coordinates_ );
1290
1291  DrawablePolygon ( const DrawablePolygon& original_ );
1292
1293  /*virtual*/ ~DrawablePolygon ( void );
1294
1295  // Operator to invoke equivalent draw API call
1296  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1297
1298  // Return polymorphic copy of object
1299  /*virtual*/ DrawableBase* copy() const;
1300
1301private:
1302  CoordinateList _coordinates;
1303};
1304
1305// Polyline (Coordinate list must contain at least three members)
1306class MagickPPExport DrawablePolyline : public DrawableBase
1307{
1308public:
1309  DrawablePolyline ( const CoordinateList &coordinates_ );
1310
1311  DrawablePolyline ( const DrawablePolyline& original_ );
1312
1313  /*virtual*/ ~DrawablePolyline ( void );
1314
1315  // Operator to invoke equivalent draw API call
1316  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1317
1318  // Return polymorphic copy of object
1319  /*virtual*/ DrawableBase* copy() const;
1320
1321private:
1322  CoordinateList _coordinates;
1323};
1324
1325// Pop Graphic Context
1326class MagickPPExport DrawablePopGraphicContext : public DrawableBase
1327{
1328public:
1329  DrawablePopGraphicContext ( void )
1330    : _dummy(0)
1331    {
1332    }
1333
1334  /*virtual*/ ~DrawablePopGraphicContext ( void );
1335
1336  // Operator to invoke equivalent draw API call
1337  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1338
1339  // Return polymorphic copy of object
1340  /*virtual*/ DrawableBase* copy() const;
1341
1342private:
1343  ::ssize_t   _dummy;
1344};
1345
1346// Push Graphic Context
1347class MagickPPExport DrawablePushGraphicContext : public DrawableBase
1348{
1349public:
1350  DrawablePushGraphicContext ( void )
1351    : _dummy(0)
1352    {
1353    }
1354
1355  /*virtual*/ ~DrawablePushGraphicContext ( void );
1356
1357  // Operator to invoke equivalent draw API call
1358  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1359
1360  // Return polymorphic copy of object
1361  /*virtual*/ DrawableBase* copy() const;
1362
1363private:
1364  ::ssize_t   _dummy;
1365};
1366
1367// Pop (terminate) Pattern definition
1368class MagickPPExport DrawablePopPattern : public DrawableBase
1369{
1370public:
1371  DrawablePopPattern ( void )
1372    : _dummy(0)
1373    {
1374    }
1375
1376  /*virtual*/ ~DrawablePopPattern ( void );
1377
1378  // Operator to invoke equivalent draw API call
1379  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1380
1381  // Return polymorphic copy of object
1382  /*virtual*/ DrawableBase* copy() const;
1383
1384private:
1385  ::ssize_t   _dummy;
1386};
1387
1388// Push (create) Pattern definition
1389class MagickPPExport DrawablePushPattern : public DrawableBase
1390{
1391public:
1392  DrawablePushPattern ( const std::string &id_, ::ssize_t x_, ::ssize_t y_,
1393                        size_t width_, size_t height_ );
1394
1395  DrawablePushPattern ( const DrawablePushPattern& original_ );
1396
1397  /*virtual*/ ~DrawablePushPattern ( void );
1398
1399  // Operator to invoke equivalent draw API call
1400  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1401
1402  // Return polymorphic copy of object
1403  /*virtual*/ DrawableBase* copy() const;
1404
1405private:
1406  std::string         _id;
1407  ::ssize_t		_x;
1408  ::ssize_t		_y;
1409  size_t		_width;
1410  size_t		_height;
1411};
1412
1413// Rectangle
1414class MagickPPExport DrawableRectangle : public DrawableBase
1415{
1416public:
1417  DrawableRectangle ( double upperLeftX_, double upperLeftY_,
1418                      double lowerRightX_, double lowerRightY_ )
1419    : _upperLeftX(upperLeftX_),
1420      _upperLeftY(upperLeftY_),
1421      _lowerRightX(lowerRightX_),
1422      _lowerRightY(lowerRightY_)
1423    { }
1424
1425  /*virtual*/ ~DrawableRectangle ( void );
1426
1427  // Operator to invoke equivalent draw API call
1428  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1429
1430  // Return polymorphic copy of object
1431  /*virtual*/ DrawableBase* copy() const;
1432
1433  void upperLeftX( double upperLeftX_ )
1434    {
1435      _upperLeftX = upperLeftX_;
1436    }
1437  double upperLeftX( void ) const
1438    {
1439      return _upperLeftX;
1440    }
1441
1442  void upperLeftY( double upperLeftY_ )
1443    {
1444      _upperLeftY = upperLeftY_;
1445    }
1446  double upperLeftY( void ) const
1447    {
1448      return _upperLeftY;
1449    }
1450
1451  void lowerRightX( double lowerRightX_ )
1452    {
1453      _lowerRightX = lowerRightX_;
1454    }
1455  double lowerRightX( void ) const
1456    {
1457      return _lowerRightX;
1458    }
1459
1460  void lowerRightY( double lowerRightY_ )
1461    {
1462      _lowerRightY = lowerRightY_;
1463    }
1464  double lowerRightY( void ) const
1465    {
1466      return _lowerRightY;
1467    }
1468
1469private:
1470  double _upperLeftX;
1471  double _upperLeftY;
1472  double _lowerRightX;
1473  double _lowerRightY;
1474};
1475
1476// Apply Rotation
1477class MagickPPExport DrawableRotation : public DrawableBase
1478{
1479public:
1480  DrawableRotation ( double angle_ )
1481    : _angle( angle_ )
1482    { }
1483
1484  /*virtual*/ ~DrawableRotation ( void );
1485
1486  // Operator to invoke equivalent draw API call
1487  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1488
1489  // Return polymorphic copy of object
1490  /*virtual*/ DrawableBase* copy() const;
1491
1492  void angle( double angle_ )
1493    {
1494      _angle = angle_;
1495    }
1496  double angle( void ) const
1497    {
1498      return _angle;
1499    }
1500
1501private:
1502  double _angle;
1503};
1504
1505// Round Rectangle
1506class MagickPPExport DrawableRoundRectangle : public DrawableBase
1507{
1508public:
1509  DrawableRoundRectangle ( double centerX_, double centerY_,
1510                           double width_, double hight_,
1511                           double cornerWidth_, double cornerHeight_ )
1512    : _centerX(centerX_),
1513      _centerY(centerY_),
1514      _width(width_),
1515      _hight(hight_),
1516      _cornerWidth(cornerWidth_),
1517      _cornerHeight(cornerHeight_)
1518    { }
1519
1520  /*virtual*/ ~DrawableRoundRectangle ( void );
1521
1522  // Operator to invoke equivalent draw API call
1523  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1524
1525  // Return polymorphic copy of object
1526  /*virtual*/ DrawableBase* copy() const;
1527
1528  void centerX( double centerX_ )
1529    {
1530      _centerX = centerX_;
1531    }
1532  double centerX( void ) const
1533    {
1534      return _centerX;
1535    }
1536
1537  void centerY( double centerY_ )
1538    {
1539      _centerY = centerY_;
1540    }
1541  double centerY( void ) const
1542    {
1543      return _centerY;
1544    }
1545
1546  void width( double width_ )
1547    {
1548      _width = width_;
1549    }
1550  double width( void ) const
1551    {
1552      return _width;
1553    }
1554
1555  void hight( double hight_ )
1556    {
1557      _hight = hight_;
1558    }
1559  double hight( void ) const
1560    {
1561      return _hight;
1562    }
1563
1564  void cornerWidth( double cornerWidth_ )
1565    {
1566      _cornerWidth = cornerWidth_;
1567    }
1568  double cornerWidth( void ) const
1569    {
1570      return _cornerWidth;
1571    }
1572
1573  void cornerHeight( double cornerHeight_ )
1574    {
1575      _cornerHeight = cornerHeight_;
1576    }
1577  double cornerHeight( void ) const
1578    {
1579      return _cornerHeight;
1580    }
1581
1582private:
1583  double _centerX;
1584  double _centerY;
1585  double _width;
1586  double _hight;
1587  double _cornerWidth;
1588  double _cornerHeight;
1589};
1590
1591// Apply Scaling
1592class MagickPPExport DrawableScaling : public DrawableBase
1593{
1594public:
1595  DrawableScaling ( double x_, double y_ )
1596    : _x(x_),
1597      _y(y_)
1598    { }
1599
1600  /*virtual*/ ~DrawableScaling ( void );
1601
1602  // Operator to invoke equivalent draw API call
1603  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1604
1605  // Return polymorphic copy of object
1606  /*virtual*/ DrawableBase* copy() const;
1607
1608  void x( double x_ )
1609    {
1610      _x = x_;
1611    }
1612  double x( void ) const
1613    {
1614      return _x;
1615    }
1616
1617  void y( double y_ )
1618    {
1619      _y = y_;
1620    }
1621  double y( void ) const
1622    {
1623      return _y;
1624    }
1625
1626private:
1627  double _x;
1628  double _y;
1629};
1630
1631// Apply Skew in X direction
1632class MagickPPExport DrawableSkewX : public DrawableBase
1633{
1634public:
1635  DrawableSkewX ( double angle_ )
1636    : _angle(angle_)
1637    { }
1638
1639  /*virtual*/ ~DrawableSkewX ( void );
1640
1641  // Operator to invoke equivalent draw API call
1642  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1643
1644  // Return polymorphic copy of object
1645  /*virtual*/ DrawableBase* copy() const;
1646
1647  void angle( double angle_ )
1648    {
1649      _angle = angle_;
1650    }
1651  double angle( void ) const
1652    {
1653      return _angle;
1654    }
1655
1656private:
1657  double _angle;
1658};
1659
1660// Apply Skew in Y direction
1661class MagickPPExport DrawableSkewY : public DrawableBase
1662{
1663public:
1664  DrawableSkewY ( double angle_ )
1665    : _angle(angle_)
1666    { }
1667
1668  /*virtual*/ ~DrawableSkewY ( void );
1669
1670  // Operator to invoke equivalent draw API call
1671  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1672
1673  // Return polymorphic copy of object
1674  /*virtual*/ DrawableBase* copy() const;
1675
1676  void angle( double angle_ )
1677    {
1678      _angle = angle_;
1679    }
1680  double angle( void ) const
1681    {
1682      return _angle;
1683    }
1684
1685private:
1686  double _angle;
1687};
1688
1689  // Stroke dasharray
1690  //
1691  // dasharray_ is an allocated array terminated by value 0.0 or 0.
1692  // The array is copied so the original does not need to be preserved.
1693  // Pass a null pointer to clear an existing dash array setting.
1694  class MagickPPExport DrawableStrokeDashArray : public DrawableBase
1695  {
1696  public:
1697
1698      DrawableStrokeDashArray(const double* dasharray_);
1699
1700      DrawableStrokeDashArray(const Magick::DrawableStrokeDashArray &original_);
1701
1702      ~DrawableStrokeDashArray(void);
1703
1704      // Operator to invoke equivalent draw API call
1705      void operator()(MagickCore::DrawingWand *context_) const;
1706
1707      // Return polymorphic copy of object
1708      DrawableBase* copy() const;
1709
1710      void dasharray(const double* dasharray_);
1711      const double* dasharray(void) const;
1712
1713      DrawableStrokeDashArray& operator=(
1714        const Magick::DrawableStrokeDashArray &original_);
1715
1716  private:
1717      size_t _size;
1718      double *_dasharray;
1719  };
1720
1721  // Stroke dashoffset
1722  class MagickPPExport DrawableStrokeDashOffset : public DrawableBase
1723  {
1724  public:
1725    DrawableStrokeDashOffset(const double offset_)
1726      : _offset(offset_)
1727      { }
1728
1729     ~DrawableStrokeDashOffset(void);
1730
1731    // Operator to invoke equivalent draw API call
1732    void operator()(MagickCore::DrawingWand *context_) const;
1733
1734    // Return polymorphic copy of object
1735    DrawableBase* copy() const;
1736
1737    void offset(const double offset_);
1738    double offset(void) const;
1739
1740  private:
1741    double _offset;
1742  };
1743
1744// Stroke linecap
1745class MagickPPExport DrawableStrokeLineCap : public DrawableBase
1746{
1747public:
1748  DrawableStrokeLineCap ( LineCap linecap_ )
1749    : _linecap(linecap_)
1750    { }
1751
1752  /*virtual*/ ~DrawableStrokeLineCap ( void );
1753
1754  // Operator to invoke equivalent draw API call
1755  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1756
1757  // Return polymorphic copy of object
1758  /*virtual*/ DrawableBase* copy() const;
1759
1760  void linecap( LineCap linecap_ )
1761    {
1762      _linecap = linecap_;
1763    }
1764  LineCap linecap( void ) const
1765    {
1766      return _linecap;
1767    }
1768
1769private:
1770  LineCap _linecap;
1771};
1772
1773// Stroke linejoin
1774class MagickPPExport DrawableStrokeLineJoin : public DrawableBase
1775{
1776public:
1777  DrawableStrokeLineJoin ( LineJoin linejoin_ )
1778    : _linejoin(linejoin_)
1779    { }
1780
1781  /*virtual*/ ~DrawableStrokeLineJoin ( void );
1782
1783  // Operator to invoke equivalent draw API call
1784  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1785
1786  // Return polymorphic copy of object
1787  /*virtual*/ DrawableBase* copy() const;
1788
1789  void linejoin( LineJoin linejoin_ )
1790    {
1791      _linejoin = linejoin_;
1792    }
1793  LineJoin linejoin( void ) const
1794    {
1795      return _linejoin;
1796    }
1797
1798private:
1799  LineJoin _linejoin;
1800};
1801
1802// Stroke miterlimit
1803class MagickPPExport DrawableMiterLimit : public DrawableBase
1804{
1805public:
1806  DrawableMiterLimit ( size_t miterlimit_ )
1807    : _miterlimit(miterlimit_)
1808    { }
1809
1810  /*virtual*/ ~DrawableMiterLimit ( void );
1811
1812  // Operator to invoke equivalent draw API call
1813  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1814
1815  // Return polymorphic copy of object
1816  /*virtual*/ DrawableBase* copy() const;
1817
1818  void miterlimit( size_t miterlimit_ )
1819    {
1820      _miterlimit = miterlimit_;
1821    }
1822  size_t miterlimit( void ) const
1823    {
1824      return _miterlimit;
1825    }
1826
1827private:
1828  size_t _miterlimit;
1829};
1830
1831// Sets the pattern used for stroking object outlines.
1832class MagickPPExport DrawableStrokePatternUrl : public DrawableBase
1833{
1834public:
1835
1836  DrawableStrokePatternUrl(const std::string &url_);
1837
1838  ~DrawableStrokePatternUrl(void);
1839
1840  DrawableStrokePatternUrl(const DrawableStrokePatternUrl& original_);
1841
1842  // Operator to invoke equivalent draw API call
1843  void operator()(MagickCore::DrawingWand *context_) const;
1844
1845  void url(const std::string &url_);
1846  std::string url(void) const;
1847
1848  // Return polymorphic copy of object
1849  DrawableBase* copy() const;
1850
1851private:
1852  std::string _url;
1853};
1854
1855// Stroke antialias
1856class MagickPPExport DrawableStrokeAntialias : public DrawableBase
1857{
1858public:
1859  DrawableStrokeAntialias ( bool flag_ )
1860    : _flag(flag_)
1861    { }
1862
1863  /*virtual*/ ~DrawableStrokeAntialias ( void );
1864
1865  // Operator to invoke equivalent draw API call
1866  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1867
1868  // Return polymorphic copy of object
1869  /*virtual*/ DrawableBase* copy() const;
1870
1871  void flag( bool flag_ )
1872    {
1873      _flag = flag_;
1874    }
1875  bool flag( void ) const
1876    {
1877      return _flag;
1878    }
1879
1880private:
1881  bool _flag;
1882};
1883
1884// Stroke color
1885class MagickPPExport DrawableStrokeColor : public DrawableBase
1886{
1887public:
1888  DrawableStrokeColor ( const Color &color_ );
1889
1890  DrawableStrokeColor ( const DrawableStrokeColor& original_ );
1891
1892  /*virtual*/ ~DrawableStrokeColor ( void );
1893
1894  // Operator to invoke equivalent draw API call
1895  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1896
1897  // Return polymorphic copy of object
1898  /*virtual*/ DrawableBase* copy() const;
1899
1900  void color( const Color& color_ )
1901    {
1902      _color = color_;
1903    }
1904  Color color( void ) const
1905    {
1906      return _color;
1907    }
1908
1909private:
1910  Color _color;
1911};
1912
1913// Stroke opacity
1914class MagickPPExport DrawableStrokeOpacity : public DrawableBase
1915{
1916public:
1917
1918  DrawableStrokeOpacity(double opacity_)
1919    : _opacity(opacity_)
1920  {
1921  }
1922
1923  ~DrawableStrokeOpacity(void);
1924
1925  // Operator to invoke equivalent draw API call
1926  void operator()(MagickCore::DrawingWand *context_) const;
1927
1928  // Return polymorphic copy of object
1929  DrawableBase* copy() const;
1930
1931  void opacity(double opacity_)
1932  {
1933    _opacity=opacity_;
1934  }
1935
1936  double opacity(void) const
1937  {
1938    return(_opacity);
1939  }
1940
1941private:
1942  double _opacity;
1943};
1944
1945// Stroke width
1946class MagickPPExport DrawableStrokeWidth : public DrawableBase
1947{
1948public:
1949  DrawableStrokeWidth ( double width_ )
1950    : _width(width_)
1951    { }
1952
1953  /*virtual*/ ~DrawableStrokeWidth ( void );
1954
1955  // Operator to invoke equivalent draw API call
1956  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1957
1958  // Return polymorphic copy of object
1959  /*virtual*/ DrawableBase* copy() const;
1960
1961  void width( double width_ )
1962    {
1963      _width = width_;
1964    }
1965  double width( void ) const
1966    {
1967      return _width;
1968    }
1969
1970private:
1971  double _width;
1972};
1973
1974// Draw text at point
1975class MagickPPExport DrawableText : public DrawableBase
1976{
1977public:
1978  DrawableText ( const double x_, const double y_,
1979                 const std::string &text_ );
1980  DrawableText ( const double x_, const double y_,
1981                 const std::string &text_, const std::string &encoding_);
1982
1983  DrawableText ( const DrawableText& original_ );
1984
1985  /*virtual*/ ~DrawableText ( void );
1986
1987  // Operator to invoke equivalent draw API call
1988  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1989
1990  // Return polymorphic copy of object
1991  /*virtual*/ DrawableBase* copy() const;
1992
1993  void encoding(const std::string &encoding_)
1994    {
1995      _encoding = encoding_;
1996    }
1997
1998  void x( double x_ )
1999    {
2000      _x = x_;
2001    }
2002  double x( void ) const
2003    {
2004      return _x;
2005    }
2006
2007  void y( double y_ )
2008    {
2009      _y = y_;
2010    }
2011  double y( void ) const
2012    {
2013      return _y;
2014    }
2015
2016  void text( const std::string &text_ )
2017    {
2018      _text = text_;
2019    }
2020  std::string text( void ) const
2021    {
2022      return _text;
2023    }
2024
2025private:
2026  double      _x;
2027  double      _y;
2028  std::string _text;
2029  std::string _encoding;
2030};
2031
2032// Text alignment
2033class MagickPPExport DrawableTextAlignment : public DrawableBase
2034{
2035public:
2036
2037  DrawableTextAlignment(AlignType alignment_);
2038
2039  DrawableTextAlignment(const DrawableTextAlignment& original_);
2040
2041  ~DrawableTextAlignment(void);
2042
2043  // Operator to invoke equivalent draw API call
2044  void operator()(MagickCore::DrawingWand *context_) const;
2045
2046  void alignment(AlignType alignment_);
2047  AlignType alignment(void) const;
2048
2049  // Return polymorphic copy of object
2050  DrawableBase* copy() const;
2051
2052private:
2053  AlignType _alignment;
2054};
2055
2056// Text antialias
2057class MagickPPExport DrawableTextAntialias : public DrawableBase
2058{
2059public:
2060  DrawableTextAntialias ( bool flag_ );
2061
2062  DrawableTextAntialias( const DrawableTextAntialias &original_ );
2063
2064  /*virtual*/ ~DrawableTextAntialias ( void );
2065
2066  // Operator to invoke equivalent draw API call
2067  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2068
2069  // Return polymorphic copy of object
2070  /*virtual*/ DrawableBase* copy() const;
2071
2072  void flag( bool flag_ )
2073    {
2074      _flag = flag_;
2075    }
2076  bool flag( void ) const
2077    {
2078      return _flag;
2079    }
2080
2081private:
2082  bool _flag;
2083};
2084
2085// Decoration (text decoration)
2086class MagickPPExport DrawableTextDecoration : public DrawableBase
2087{
2088public:
2089  DrawableTextDecoration ( DecorationType decoration_ );
2090
2091  DrawableTextDecoration ( const DrawableTextDecoration& original_ );
2092
2093  /*virtual*/ ~DrawableTextDecoration( void );
2094
2095  // Operator to invoke equivalent draw API call
2096  /*virtual*/  void operator()( MagickCore::DrawingWand *context_ ) const;
2097
2098  // Return polymorphic copy of object
2099  /*virtual*/ DrawableBase* copy() const;
2100
2101  void decoration( DecorationType decoration_ )
2102    {
2103      _decoration = decoration_;
2104    }
2105  DecorationType decoration( void ) const
2106    {
2107      return _decoration;
2108    }
2109
2110private:
2111  DecorationType _decoration;
2112};
2113
2114  // Render text right-to-left or left-to-right.
2115  class MagickPPExport DrawableTextDirection : public DrawableBase
2116  {
2117  public:
2118
2119    DrawableTextDirection(DirectionType direction_);
2120
2121    ~DrawableTextDirection(void);
2122
2123    void operator()(MagickCore::DrawingWand *context_) const;
2124
2125    void direction(DirectionType direction_);
2126    DirectionType direction(void) const;
2127
2128    DrawableBase* copy() const;
2129
2130  private:
2131    DirectionType _direction;
2132  };
2133
2134  // Specify text inter-line spacing
2135  class MagickPPExport DrawableTextInterlineSpacing : public DrawableBase
2136  {
2137  public:
2138
2139    DrawableTextInterlineSpacing(double spacing_);
2140
2141    ~DrawableTextInterlineSpacing(void);
2142
2143    void operator()(MagickCore::DrawingWand *context_) const;
2144
2145    void spacing(double spacing_);
2146    double spacing(void) const;
2147
2148    DrawableBase* copy() const;
2149
2150  private:
2151    double _spacing;
2152  };
2153
2154  // Specify text inter-word spacing
2155  class MagickPPExport DrawableTextInterwordSpacing : public DrawableBase
2156  {
2157  public:
2158
2159    DrawableTextInterwordSpacing(double spacing_);
2160
2161    ~DrawableTextInterwordSpacing(void);
2162
2163    void operator()(MagickCore::DrawingWand *context_) const;
2164
2165    void spacing(double spacing_);
2166    double spacing(void) const;
2167
2168    DrawableBase *copy() const;
2169
2170  private:
2171    double _spacing;
2172  };
2173
2174  // Specify text kerning
2175  class MagickPPExport DrawableTextKerning : public DrawableBase
2176  {
2177  public:
2178
2179    DrawableTextKerning(double kerning_);
2180
2181    ~DrawableTextKerning(void);
2182
2183    void operator()(MagickCore::DrawingWand *context_) const;
2184
2185    void kerning(double kerning_);
2186    double kerning(void) const;
2187
2188    DrawableBase *copy() const;
2189
2190  private:
2191    double _kerning;
2192  };
2193
2194// Text undercolor box
2195class MagickPPExport DrawableTextUnderColor : public DrawableBase
2196{
2197public:
2198  DrawableTextUnderColor ( const Color &color_ );
2199
2200  DrawableTextUnderColor ( const DrawableTextUnderColor& original_ );
2201
2202  /*virtual*/ ~DrawableTextUnderColor ( void );
2203
2204  // Operator to invoke equivalent draw API call
2205  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2206
2207  // Return polymorphic copy of object
2208  /*virtual*/ DrawableBase* copy() const;
2209
2210  void color( const Color& color_ )
2211    {
2212      _color = color_;
2213    }
2214  Color color( void ) const
2215    {
2216      return _color;
2217    }
2218
2219private:
2220  Color _color;
2221};
2222
2223// Apply Translation
2224class MagickPPExport DrawableTranslation : public DrawableBase
2225{
2226public:
2227  DrawableTranslation ( double x_, double y_ )
2228    : _x(x_),
2229      _y(y_)
2230    { }
2231
2232  /*virtual*/ ~DrawableTranslation ( void );
2233
2234  // Operator to invoke equivalent draw API call
2235  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2236
2237  // Return polymorphic copy of object
2238  /*virtual*/ DrawableBase* copy() const;
2239
2240  void x( double x_ )
2241    {
2242      _x = x_;
2243    }
2244  double x( void ) const
2245    {
2246      return _x;
2247    }
2248
2249  void y( double y_ )
2250    {
2251      _y = y_;
2252    }
2253  double y( void ) const
2254    {
2255      return _y;
2256    }
2257
2258private:
2259  double _x;
2260  double _y;
2261};
2262
2263// Set the size of the viewbox
2264class MagickPPExport DrawableViewbox : public DrawableBase
2265{
2266public:
2267  DrawableViewbox(::ssize_t x1_, ::ssize_t y1_,
2268                  ::ssize_t x2_, ::ssize_t y2_)
2269    : _x1(x1_),
2270      _y1(y1_),
2271      _x2(x2_),
2272      _y2(y2_) { }
2273
2274  /*virtual*/ ~DrawableViewbox ( void );
2275
2276  // Operator to invoke equivalent draw API call
2277  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2278
2279  // Return polymorphic copy of object
2280  /*virtual*/
2281  DrawableBase* copy() const;
2282
2283  void x1( ::ssize_t x1_ )
2284    {
2285      _x1 = x1_;
2286    }
2287  ::ssize_t x1( void ) const
2288    {
2289      return _x1;
2290    }
2291
2292  void y1( ::ssize_t y1_ )
2293    {
2294      _y1 = y1_;
2295    }
2296  ::ssize_t y1( void ) const
2297    {
2298      return _y1;
2299    }
2300
2301  void x2( ::ssize_t x2_ )
2302    {
2303      _x2 = x2_;
2304    }
2305  ::ssize_t x2( void ) const
2306    {
2307      return _x2;
2308    }
2309
2310  void y2( ::ssize_t y2_ )
2311    {
2312      _y2 = y2_;
2313    }
2314  ::ssize_t y2( void ) const
2315    {
2316      return _y2;
2317    }
2318
2319private:
2320  ::ssize_t _x1;
2321  ::ssize_t _y1;
2322  ::ssize_t _x2;
2323  ::ssize_t _y2;
2324};
2325
2326//
2327// Path Element Classes To Support DrawablePath
2328//
2329class MagickPPExport PathArcArgs
2330{
2331public:
2332  PathArcArgs( void );
2333
2334  PathArcArgs( double radiusX_, double radiusY_,
2335               double xAxisRotation_, bool largeArcFlag_,
2336               bool sweepFlag_, double x_, double y_ );
2337
2338  PathArcArgs( const PathArcArgs &original_ );
2339
2340  ~PathArcArgs ( void );
2341
2342  void radiusX( double radiusX_ )
2343    {
2344      _radiusX = radiusX_;
2345    }
2346  double radiusX( void ) const
2347    {
2348      return _radiusX;
2349    }
2350
2351  void radiusY( double radiusY_ )
2352    {
2353      _radiusY = radiusY_;
2354    }
2355  double radiusY( void ) const
2356    {
2357      return _radiusY;
2358    }
2359
2360  void xAxisRotation( double xAxisRotation_ )
2361    {
2362      _xAxisRotation = xAxisRotation_;
2363    }
2364  double xAxisRotation( void ) const
2365    {
2366      return _xAxisRotation;
2367    }
2368
2369  void largeArcFlag( bool largeArcFlag_ )
2370    {
2371      _largeArcFlag = largeArcFlag_;
2372    }
2373  bool largeArcFlag( void ) const
2374    {
2375      return _largeArcFlag;
2376    }
2377
2378  void sweepFlag( bool sweepFlag_ )
2379    {
2380      _sweepFlag = sweepFlag_;
2381    }
2382  bool sweepFlag( void ) const
2383    {
2384      return _sweepFlag;
2385    }
2386
2387  void x( double x_ )
2388    {
2389      _x = x_;
2390    }
2391  double x( void ) const
2392    {
2393      return _x;
2394    }
2395
2396  void y( double y_ )
2397    {
2398      _y = y_;
2399    }
2400  double y( void ) const
2401    {
2402      return _y;
2403    }
2404
2405private:
2406  double	_radiusX;	// X radius
2407  double	_radiusY;	// Y radius
2408  double	_xAxisRotation;	// Rotation relative to X axis
2409  bool        _largeArcFlag;	// Draw longer of the two matching arcs
2410  bool        _sweepFlag;	// Draw arc matching clock-wise rotation
2411  double	_x;		// End-point X
2412  double	_y;		// End-point Y
2413};
2414
2415// Compare two PathArcArgs objects regardless of LHS/RHS
2416extern MagickPPExport int operator == ( const PathArcArgs& left_,
2417                                      const PathArcArgs& right_ );
2418extern MagickPPExport int operator != ( const PathArcArgs& left_,
2419                                      const PathArcArgs& right_ );
2420extern MagickPPExport int operator >  ( const PathArcArgs& left_,
2421                                      const PathArcArgs& right_ );
2422extern MagickPPExport int operator <  ( const PathArcArgs& left_,
2423                                      const PathArcArgs& right_ );
2424extern MagickPPExport int operator >= ( const PathArcArgs& left_,
2425                                      const PathArcArgs& right_ );
2426extern MagickPPExport int operator <= ( const PathArcArgs& left_,
2427                                      const PathArcArgs& right_ );
2428
2429typedef std::vector<Magick::PathArcArgs> PathArcArgsList;
2430
2431#if defined(MagickDLLExplicitTemplate)
2432
2433MagickDrawableExtern template class MagickPPExport
2434std::allocator<Magick::PathArcArgs>;
2435
2436// MagickDrawableExtern template class MagickPPExport
2437// std::vector<Magick::PathArcArgs, std::allocator<Magick::PathArcArgs> >;
2438
2439#endif // MagickDLLExplicitTemplate
2440
2441// Path Arc (Elliptical Arc)
2442class MagickPPExport PathArcAbs : public VPathBase
2443{
2444public:
2445  // Draw a single arc segment
2446  PathArcAbs ( const PathArcArgs &coordinates_ );
2447
2448  // Draw multiple arc segments
2449  PathArcAbs ( const PathArcArgsList &coordinates_ );
2450
2451  // Copy constructor
2452  PathArcAbs ( const PathArcAbs& original_ );
2453
2454  // Destructor
2455  /*virtual*/ ~PathArcAbs ( void );
2456
2457  // Operator to invoke equivalent draw API call
2458  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2459
2460  // Return polymorphic copy of object
2461  /*virtual*/ VPathBase* copy() const;
2462
2463private:
2464  PathArcArgsList _coordinates;
2465};
2466class MagickPPExport PathArcRel : public VPathBase
2467{
2468public:
2469  // Draw a single arc segment
2470  PathArcRel ( const PathArcArgs &coordinates_ );
2471
2472  // Draw multiple arc segments
2473  PathArcRel ( const PathArcArgsList &coordinates_ );
2474
2475  PathArcRel ( const PathArcRel& original_ );
2476
2477  /*virtual*/ ~PathArcRel ( void );
2478
2479  // Operator to invoke equivalent draw API call
2480  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2481
2482  // Return polymorphic copy of object
2483  /*virtual*/ VPathBase* copy() const;
2484
2485private:
2486  PathArcArgsList _coordinates;
2487};
2488
2489// Path Closepath
2490class MagickPPExport PathClosePath : public VPathBase
2491{
2492public:
2493  PathClosePath ( void )
2494    : _dummy(0)
2495    {
2496    }
2497
2498  /*virtual*/ ~PathClosePath ( void );
2499
2500  // Operator to invoke equivalent draw API call
2501  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2502
2503  // Return polymorphic copy of object
2504  /*virtual*/ VPathBase* copy() const;
2505
2506private:
2507  ::ssize_t   _dummy;
2508};
2509
2510//
2511// Curveto (Cubic Bezier)
2512//
2513class MagickPPExport PathCurvetoArgs
2514{
2515public:
2516  PathCurvetoArgs( void );
2517
2518  PathCurvetoArgs( double x1_, double y1_,
2519                   double x2_, double y2_,
2520                   double x_, double y_ );
2521
2522  PathCurvetoArgs( const PathCurvetoArgs &original_ );
2523
2524  ~PathCurvetoArgs ( void );
2525
2526  void x1( double x1_ )
2527    {
2528      _x1 = x1_;
2529    }
2530double x1( void ) const
2531{
2532  return _x1;
2533}
2534
2535void y1( double y1_ )
2536{
2537  _y1 = y1_;
2538}
2539double y1( void ) const
2540{
2541  return _y1;
2542}
2543
2544void x2( double x2_ )
2545{
2546  _x2 = x2_;
2547}
2548double x2( void ) const
2549{
2550  return _x2;
2551}
2552
2553void y2( double y2_ )
2554{
2555  _y2 = y2_;
2556}
2557double y2( void ) const
2558{
2559  return _y2;
2560}
2561
2562void x( double x_ )
2563{
2564  _x = x_;
2565}
2566double x( void ) const
2567{
2568  return _x;
2569}
2570
2571void y( double y_ )
2572{
2573  _y = y_;
2574}
2575double y( void ) const
2576{
2577  return _y;
2578}
2579
2580private:
2581double _x1;
2582double _y1;
2583double _x2;
2584double _y2;
2585double _x;
2586double _y;
2587};
2588
2589// Compare two PathCurvetoArgs objects regardless of LHS/RHS
2590extern MagickPPExport int operator == ( const PathCurvetoArgs& left_,
2591                                      const PathCurvetoArgs& right_ );
2592extern MagickPPExport int operator != ( const PathCurvetoArgs& left_,
2593                                      const PathCurvetoArgs& right_ );
2594extern MagickPPExport int operator >  ( const PathCurvetoArgs& left_,
2595                                      const PathCurvetoArgs& right_ );
2596extern MagickPPExport int operator <  ( const PathCurvetoArgs& left_,
2597                                      const PathCurvetoArgs& right_ );
2598extern MagickPPExport int operator >= ( const PathCurvetoArgs& left_,
2599                                      const PathCurvetoArgs& right_ );
2600extern MagickPPExport int operator <= ( const PathCurvetoArgs& left_,
2601                                      const PathCurvetoArgs& right_ );
2602
2603typedef std::vector<Magick::PathCurvetoArgs> PathCurveToArgsList;
2604
2605#if defined(MagickDLLExplicitTemplate)
2606
2607MagickDrawableExtern template class MagickPPExport
2608std::allocator<Magick::PathCurvetoArgs>;
2609
2610// MagickDrawableExtern template class MagickPPExport
2611// std::vector<Magick::PathCurvetoArgs, std::allocator<Magick::PathCurvetoArgs> >;
2612
2613#endif // MagickDLLExplicitTemplate
2614
2615class MagickPPExport PathCurvetoAbs : public VPathBase
2616{
2617public:
2618  // Draw a single curve
2619  PathCurvetoAbs ( const PathCurvetoArgs &args_ );
2620
2621  // Draw multiple curves
2622  PathCurvetoAbs ( const PathCurveToArgsList &args_ );
2623
2624  // Copy constructor
2625  PathCurvetoAbs ( const PathCurvetoAbs& original_ );
2626
2627  // Destructor
2628  /*virtual*/ ~PathCurvetoAbs ( void );
2629
2630  // Operator to invoke equivalent draw API call
2631  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2632
2633  // Return polymorphic copy of object
2634  /*virtual*/ VPathBase* copy() const;
2635
2636private:
2637  PathCurveToArgsList _args;
2638};
2639class MagickPPExport PathCurvetoRel : public VPathBase
2640{
2641public:
2642  // Draw a single curve
2643  PathCurvetoRel ( const PathCurvetoArgs &args_ );
2644
2645  // Draw multiple curves
2646  PathCurvetoRel ( const PathCurveToArgsList &args_ );
2647
2648  // Copy constructor
2649  PathCurvetoRel ( const PathCurvetoRel& original_ );
2650
2651  /*virtual*/ ~PathCurvetoRel ( void );
2652
2653  // Operator to invoke equivalent draw API call
2654  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2655
2656  // Return polymorphic copy of object
2657  /*virtual*/ VPathBase* copy() const;
2658
2659private:
2660  PathCurveToArgsList _args;
2661};
2662class MagickPPExport PathSmoothCurvetoAbs : public VPathBase
2663{
2664public:
2665  // Draw a single curve
2666  PathSmoothCurvetoAbs ( const Magick::Coordinate &coordinates_ );
2667
2668  // Draw multiple curves
2669  PathSmoothCurvetoAbs ( const CoordinateList &coordinates_ );
2670
2671  // Copy constructor
2672  PathSmoothCurvetoAbs ( const PathSmoothCurvetoAbs& original_ );
2673
2674  /*virtual*/ ~PathSmoothCurvetoAbs ( void );
2675
2676  // Operator to invoke equivalent draw API call
2677  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2678
2679  // Return polymorphic copy of object
2680  /*virtual*/
2681  VPathBase* copy() const;
2682
2683private:
2684  CoordinateList _coordinates;
2685};
2686class MagickPPExport PathSmoothCurvetoRel : public VPathBase
2687{
2688public:
2689  // Draw a single curve
2690  PathSmoothCurvetoRel ( const Coordinate &coordinates_ );
2691
2692  // Draw multiple curves
2693  PathSmoothCurvetoRel ( const CoordinateList &coordinates_ );
2694
2695  // Copy constructor
2696  PathSmoothCurvetoRel ( const PathSmoothCurvetoRel& original_ );
2697
2698  // Destructor
2699  /*virtual*/ ~PathSmoothCurvetoRel ( void );
2700
2701  // Operator to invoke equivalent draw API call
2702  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2703
2704  // Return polymorphic copy of object
2705  /*virtual*/
2706  VPathBase* copy() const;
2707
2708private:
2709  CoordinateList _coordinates;
2710};
2711
2712//
2713// Quadratic Curveto (Quadratic Bezier)
2714//
2715class MagickPPExport PathQuadraticCurvetoArgs
2716{
2717public:
2718  PathQuadraticCurvetoArgs( void );
2719
2720  PathQuadraticCurvetoArgs( double x1_, double y1_,
2721                            double x_, double y_ );
2722
2723  PathQuadraticCurvetoArgs( const PathQuadraticCurvetoArgs &original_ );
2724
2725  ~PathQuadraticCurvetoArgs ( void );
2726
2727  void x1( double x1_ )
2728    {
2729      _x1 = x1_;
2730    }
2731  double x1( void ) const
2732    {
2733      return _x1;
2734    }
2735
2736  void y1( double y1_ )
2737    {
2738      _y1 = y1_;
2739    }
2740  double y1( void ) const
2741    {
2742      return _y1;
2743    }
2744
2745  void x( double x_ )
2746    {
2747      _x = x_;
2748    }
2749  double x( void ) const
2750    {
2751      return _x;
2752    }
2753
2754  void y( double y_ )
2755    {
2756      _y = y_;
2757    }
2758  double y( void ) const
2759    {
2760      return _y;
2761    }
2762
2763private:
2764  double _x1;
2765  double _y1;
2766  double _x;
2767  double _y;
2768};
2769
2770// Compare two PathQuadraticCurvetoArgs objects regardless of LHS/RHS
2771extern MagickPPExport int operator == ( const PathQuadraticCurvetoArgs& left_,
2772                                      const PathQuadraticCurvetoArgs& right_ );
2773extern MagickPPExport int operator != ( const PathQuadraticCurvetoArgs& left_,
2774                                      const PathQuadraticCurvetoArgs& right_);
2775extern MagickPPExport int operator >  ( const PathQuadraticCurvetoArgs& left_,
2776                                      const PathQuadraticCurvetoArgs& right_);
2777extern MagickPPExport int operator <  ( const PathQuadraticCurvetoArgs& left_,
2778                                      const PathQuadraticCurvetoArgs& right_);
2779extern MagickPPExport int operator >= ( const PathQuadraticCurvetoArgs& left_,
2780                                      const PathQuadraticCurvetoArgs& right_ );
2781extern MagickPPExport int operator <= ( const PathQuadraticCurvetoArgs& left_,
2782                                      const PathQuadraticCurvetoArgs& right_ );
2783
2784typedef std::vector<Magick::PathQuadraticCurvetoArgs> PathQuadraticCurvetoArgsList;
2785
2786#if defined(MagickDLLExplicitTemplate)
2787
2788MagickDrawableExtern template class MagickPPExport
2789std::allocator<Magick::PathQuadraticCurvetoArgs>;
2790
2791// MagickDrawableExtern template class MagickPPExport
2792// std::vector<Magick::PathQuadraticCurvetoArgs, std::allocator<Magick::PathQuadraticCurvetoArgs> >;
2793
2794#endif // MagickDLLExplicitTemplate
2795
2796class MagickPPExport PathQuadraticCurvetoAbs : public VPathBase
2797{
2798public:
2799  // Draw a single curve
2800  PathQuadraticCurvetoAbs ( const Magick::PathQuadraticCurvetoArgs &args_ );
2801
2802  // Draw multiple curves
2803  PathQuadraticCurvetoAbs ( const PathQuadraticCurvetoArgsList &args_ );
2804
2805  // Copy constructor
2806  PathQuadraticCurvetoAbs ( const PathQuadraticCurvetoAbs& original_ );
2807
2808  // Destructor
2809  /*virtual*/ ~PathQuadraticCurvetoAbs ( void );
2810
2811  // Operator to invoke equivalent draw API call
2812  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2813
2814  // Return polymorphic copy of object
2815  /*virtual*/ VPathBase* copy() const;
2816
2817private:
2818  PathQuadraticCurvetoArgsList _args;
2819};
2820class MagickPPExport PathQuadraticCurvetoRel : public VPathBase
2821{
2822public:
2823  // Draw a single curve
2824  PathQuadraticCurvetoRel ( const Magick::PathQuadraticCurvetoArgs &args_ );
2825
2826  // Draw multiple curves
2827  PathQuadraticCurvetoRel ( const PathQuadraticCurvetoArgsList &args_ );
2828
2829  // Copy constructor
2830  PathQuadraticCurvetoRel ( const PathQuadraticCurvetoRel& original_ );
2831
2832  // Destructor
2833  /*virtual*/ ~PathQuadraticCurvetoRel ( void );
2834
2835  // Operator to invoke equivalent draw API call
2836  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2837
2838  // Return polymorphic copy of object
2839  /*virtual*/ VPathBase* copy() const;
2840
2841private:
2842  PathQuadraticCurvetoArgsList _args;
2843};
2844class MagickPPExport PathSmoothQuadraticCurvetoAbs : public VPathBase
2845{
2846public:
2847  // Draw a single curve
2848  PathSmoothQuadraticCurvetoAbs ( const Magick::Coordinate &coordinate_ );
2849
2850  // Draw multiple curves
2851  PathSmoothQuadraticCurvetoAbs ( const CoordinateList &coordinates_ );
2852
2853  // Copy constructor
2854  PathSmoothQuadraticCurvetoAbs ( const PathSmoothQuadraticCurvetoAbs& original_ );
2855
2856  // Destructor
2857  /*virtual*/ ~PathSmoothQuadraticCurvetoAbs ( void );
2858
2859  // Operator to invoke equivalent draw API call
2860  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2861
2862  // Return polymorphic copy of object
2863  /*virtual*/ VPathBase* copy() const;
2864
2865private:
2866  CoordinateList _coordinates;
2867};
2868class MagickPPExport PathSmoothQuadraticCurvetoRel : public VPathBase
2869{
2870public:
2871  // Draw a single curve
2872  PathSmoothQuadraticCurvetoRel ( const Magick::Coordinate &coordinate_ );
2873
2874  // Draw multiple curves
2875  PathSmoothQuadraticCurvetoRel ( const CoordinateList &coordinates_ );
2876
2877  // Copy constructor
2878  PathSmoothQuadraticCurvetoRel ( const PathSmoothQuadraticCurvetoRel& original_ );
2879
2880  // Destructor
2881  /*virtual*/ ~PathSmoothQuadraticCurvetoRel ( void );
2882
2883  // Operator to invoke equivalent draw API call
2884  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2885
2886  // Return polymorphic copy of object
2887  /*virtual*/ VPathBase* copy() const;
2888
2889private:
2890  CoordinateList _coordinates;
2891};
2892
2893//
2894// Path Lineto
2895//
2896class MagickPPExport PathLinetoAbs : public VPathBase
2897{
2898public:
2899  // Draw to a single point
2900  PathLinetoAbs ( const Magick::Coordinate& coordinate_  );
2901
2902  // Draw to multiple points
2903  PathLinetoAbs ( const CoordinateList &coordinates_ );
2904
2905  // Copy constructor
2906  PathLinetoAbs ( const PathLinetoAbs& original_ );
2907
2908  // Destructor
2909  /*virtual*/ ~PathLinetoAbs ( void );
2910
2911  // Operator to invoke equivalent draw API call
2912  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2913
2914  // Return polymorphic copy of object
2915  /*virtual*/ VPathBase* copy() const;
2916
2917private:
2918  CoordinateList _coordinates;
2919};
2920class MagickPPExport PathLinetoRel : public VPathBase
2921{
2922public:
2923  // Draw to a single point
2924  PathLinetoRel ( const Magick::Coordinate& coordinate_ );
2925
2926  // Draw to multiple points
2927  PathLinetoRel ( const CoordinateList &coordinates_ );
2928
2929  // Copy constructor
2930  PathLinetoRel ( const PathLinetoRel& original_ );
2931
2932  // Destructor
2933  /*virtual*/ ~PathLinetoRel ( void );
2934
2935  // Operator to invoke equivalent draw API call
2936  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2937
2938  // Return polymorphic copy of object
2939  /*virtual*/ VPathBase* copy() const;
2940
2941private:
2942  CoordinateList _coordinates;
2943};
2944
2945// Path Horizontal Lineto
2946class MagickPPExport PathLinetoHorizontalAbs : public VPathBase
2947{
2948public:
2949  PathLinetoHorizontalAbs ( double x_ )
2950    : _x(x_)
2951    {
2952    }
2953
2954  /*virtual*/ ~PathLinetoHorizontalAbs ( void );
2955
2956  // Operator to invoke equivalent draw API call
2957  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2958
2959  // Return polymorphic copy of object
2960  /*virtual*/ VPathBase* copy() const;
2961
2962  void x( double x_ )
2963    {
2964      _x = x_;
2965    }
2966  double x( void ) const
2967    {
2968      return _x;
2969    }
2970
2971private:
2972  double _x;
2973};
2974class MagickPPExport PathLinetoHorizontalRel : public VPathBase
2975{
2976public:
2977  PathLinetoHorizontalRel ( double x_ )
2978    : _x(x_)
2979    {
2980    }
2981
2982  /*virtual*/ ~PathLinetoHorizontalRel ( void );
2983
2984  // Operator to invoke equivalent draw API call
2985  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2986
2987  // Return polymorphic copy of object
2988  /*virtual*/ VPathBase* copy() const;
2989
2990  void x( double x_ )
2991    {
2992      _x = x_;
2993    }
2994  double x( void ) const
2995    {
2996      return _x;
2997    }
2998
2999private:
3000  double _x;
3001};
3002
3003// Path Vertical Lineto
3004class MagickPPExport PathLinetoVerticalAbs : public VPathBase
3005{
3006public:
3007  PathLinetoVerticalAbs ( double y_ )
3008    : _y(y_)
3009    {
3010    }
3011
3012  /*virtual*/ ~PathLinetoVerticalAbs ( void );
3013
3014  // Operator to invoke equivalent draw API call
3015  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3016
3017  // Return polymorphic copy of object
3018  /*virtual*/ VPathBase* copy() const;
3019
3020  void y( double y_ )
3021    {
3022      _y = y_;
3023    }
3024  double y( void ) const
3025    {
3026      return _y;
3027    }
3028
3029private:
3030  double _y;
3031};
3032class MagickPPExport PathLinetoVerticalRel : public VPathBase
3033{
3034public:
3035  PathLinetoVerticalRel ( double y_ )
3036    : _y(y_)
3037    {
3038    }
3039
3040  /*virtual*/ ~PathLinetoVerticalRel ( void );
3041
3042  // Operator to invoke equivalent draw API call
3043  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3044
3045  // Return polymorphic copy of object
3046  /*virtual*/ VPathBase* copy() const;
3047
3048  void y( double y_ )
3049    {
3050      _y = y_;
3051    }
3052  double y( void ) const
3053    {
3054      return _y;
3055    }
3056
3057private:
3058  double _y;
3059};
3060
3061// Path Moveto
3062class MagickPPExport PathMovetoAbs : public VPathBase
3063{
3064public:
3065  // Simple moveto
3066  PathMovetoAbs ( const Magick::Coordinate &coordinate_ );
3067
3068  // Moveto followed by implicit linetos
3069  PathMovetoAbs ( const CoordinateList &coordinates_ );
3070
3071  // Copy constructor
3072  PathMovetoAbs ( const PathMovetoAbs& original_ );
3073
3074  // Destructor
3075  /*virtual*/ ~PathMovetoAbs ( void );
3076
3077  // Operator to invoke equivalent draw API call
3078  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3079
3080  // Return polymorphic copy of object
3081  /*virtual*/ VPathBase* copy() const;
3082
3083private:
3084  CoordinateList _coordinates;
3085};
3086class MagickPPExport PathMovetoRel : public VPathBase
3087{
3088public:
3089  // Simple moveto
3090  PathMovetoRel ( const Magick::Coordinate &coordinate_ );
3091
3092  // Moveto followed by implicit linetos
3093  PathMovetoRel ( const CoordinateList &coordinates_ );
3094
3095  // Copy constructor
3096  PathMovetoRel ( const PathMovetoRel& original_ );
3097
3098  // Destructor
3099  /*virtual*/ ~PathMovetoRel ( void );
3100
3101  // Operator to invoke equivalent draw API call
3102  /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3103
3104  // Return polymorphic copy of object
3105  /*virtual*/ VPathBase* copy() const;
3106
3107private:
3108  CoordinateList _coordinates;
3109};
3110
3111} // namespace Magick
3112
3113#endif // Magick_Drawable_header
3114