Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:17

0001 // This may look like C code, but it is really -*- C++ -*-
0002 //
0003 // Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
0004 //
0005 // Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
0006 // dedicated to making software imaging solutions freely available.
0007 //
0008 // Definition of Drawable (Graphic objects)
0009 //
0010 // The technique used for instantiating classes which derive from STL
0011 // templates is described in Microsoft MSDN Article ID: Q168958
0012 // "HOWTO: Exporting STL Components Inside & Outside of a Class".
0013 // "http://support.microsoft.com/kb/168958"
0014 //
0015 // Note that version 3.0 of this article says that only STL
0016 // container template which supports DLL export is <vector> and we are
0017 // not using <vector> as part of the Drawable implementation.
0018 //
0019 
0020 #if !defined(Magick_Drawable_header)
0021 #define Magick_Drawable_header
0022 
0023 #include "Magick++/Include.h"
0024 
0025 #include <functional>
0026 #include <string>
0027 #include <vector>
0028 #include <utility>
0029 #include "Magick++/Color.h"
0030 #include "Magick++/Geometry.h"
0031 
0032 #if defined(MagickDLLExplicitTemplate)
0033 #  if defined(MAGICK_PLUSPLUS_IMPLEMENTATION)
0034 #    define MagickDrawableExtern
0035 #  else
0036 #   pragma warning( disable: 4231 ) // Disable warning regarding using extern
0037 #    define MagickDrawableExtern extern
0038 #  endif // MAGICK_PLUSPLUS_IMPLEMENTATION
0039 #else
0040 #  define MagickDrawableExtern
0041 #endif // MagickDLLExplicitTemplate
0042 
0043 namespace Magick
0044 {
0045   //
0046   // Representation of an x,y coordinate
0047   //
0048   class MagickPPExport Coordinate
0049   {
0050   public:
0051 
0052     Coordinate(void)
0053       : _x(0),
0054         _y(0) {}
0055 
0056     Coordinate(double x_,double y_)
0057       : _x(x_),
0058         _y(y_) {}
0059 
0060     virtual ~Coordinate() {}
0061 
0062     void x(double x_) { _x=x_; }
0063     double x(void) const { return _x; }
0064 
0065     void y(double y_) { _y=y_; }
0066     double y(void) const { return _y; }
0067 
0068   private:
0069     double _x;
0070     double _y;
0071   };
0072 
0073   typedef std::vector<Magick::Coordinate> CoordinateList;
0074 
0075 #if defined(MagickDLLExplicitTemplate)
0076 
0077   MagickDrawableExtern template class MagickPPExport
0078   std::allocator<Magick::Coordinate>;
0079 
0080 #endif // MagickDLLExplicitTemplate
0081 
0082   // Compare two Coordinate objects regardless of LHS/RHS
0083   extern MagickPPExport int operator ==
0084     (const Coordinate& left_,const Coordinate& right_);
0085   extern MagickPPExport int operator !=
0086     (const Coordinate& left_, const Coordinate& right_);
0087   extern MagickPPExport int operator >
0088     (const Coordinate& left_, const Coordinate& right_);
0089   extern MagickPPExport int operator <
0090     (const Coordinate& left_, const Coordinate& right_);
0091   extern MagickPPExport int operator >=
0092     (const Coordinate& left_, const Coordinate& right_);
0093   extern MagickPPExport int operator <=
0094     (const Coordinate& left_, const Coordinate& right_);
0095 
0096   //
0097   // Base class for all drawable objects
0098   //
0099   class MagickPPExport DrawableBase
0100   {
0101   public:
0102 
0103     // Default constructor
0104     DrawableBase(void);
0105 
0106     // Destructor
0107     virtual ~DrawableBase(void);
0108 
0109     // Operator to invoke equivalent draw API call
0110     virtual void operator()(MagickCore::DrawingWand *) const;
0111 
0112     // Return polymorphic copy of object
0113     virtual DrawableBase* copy() const;
0114   };
0115 
0116   //
0117   // Representation of a drawable surrogate object to manage drawable objects
0118   //
0119   #undef Drawable // Conflict with <X11/Xproto.h>
0120   class MagickPPExport Drawable
0121   {
0122   public:
0123 
0124     // Default constructor
0125     Drawable(void);
0126 
0127     // Construct from DrawableBase
0128     Drawable(const DrawableBase& original_);
0129 
0130     // Destructor
0131     ~Drawable(void);
0132 
0133     // Copy constructor
0134     Drawable(const Drawable& original_);
0135 
0136     // Assignment operator
0137     Drawable& operator=(const Drawable& original_);
0138 
0139     // Operator to invoke contained object
0140     void operator()(MagickCore::DrawingWand *) const;
0141 
0142   private:
0143     DrawableBase* dp;
0144   };
0145 
0146   typedef std::vector<Magick::Drawable> DrawableList;
0147 
0148 #if defined(MagickDLLExplicitTemplate)
0149 
0150   MagickDrawableExtern template class MagickPPExport
0151   std::allocator<Magick::Drawable>;
0152 
0153 #endif // MagickDLLExplicitTemplate
0154 
0155 //
0156 // Base class for all drawable path elements for use with
0157 // DrawablePath
0158 //
0159 class MagickPPExport VPathBase
0160 {
0161 public:
0162   // Constructor
0163   VPathBase ( void )
0164     { }
0165 
0166   // Destructor
0167   virtual ~VPathBase ( void );
0168 
0169   // Assignment operator
0170   //    const VPathBase& operator= (const VPathBase& original_ );
0171 
0172   // Operator to invoke equivalent draw API call
0173   virtual void operator()( MagickCore::DrawingWand *context_ ) const = 0;
0174 
0175   // Return polymorphic copy of object
0176   virtual VPathBase* copy() const = 0;
0177 };
0178 
0179 //
0180 // Representation of a drawable path element surrogate object to
0181 // manage drawable path elements so they may be passed as a list to
0182 // DrawablePath.
0183 //
0184 class MagickPPExport VPath
0185 {
0186 public:
0187   // Constructor
0188   VPath ( void );
0189 
0190   // Construct from VPathBase
0191   VPath ( const VPathBase& original_ );
0192 
0193   // Destructor
0194   virtual ~VPath ( void );
0195 
0196   // Copy constructor
0197   VPath ( const VPath& original_ );
0198 
0199   // Assignment operator
0200   VPath& operator= (const VPath& original_ );
0201 
0202   // Operator to invoke contained object
0203   void operator()( MagickCore::DrawingWand *context_ ) const;
0204 
0205 private:
0206   VPathBase* dp;
0207 };
0208 
0209 typedef std::vector<Magick::VPath> VPathList;
0210 
0211 #if defined(MagickDLLExplicitTemplate)
0212 
0213 MagickDrawableExtern template class MagickPPExport
0214 std::allocator<Magick::VPath>;
0215 
0216 // MagickDrawableExtern template class MagickPPExport
0217 // std::vector<Magick::VPath, std::allocator<Magick::VPath> >;
0218 
0219 #endif // MagickDLLExplicitTemplate
0220 
0221 //
0222 // Drawable Objects
0223 //
0224 
0225 // Affine (scaling, rotation, and translation)
0226 class MagickPPExport DrawableAffine  : public DrawableBase
0227 {
0228 public:
0229   DrawableAffine ( double sx_, double sy_,
0230                    double rx_, double ry_,
0231                    double tx_, double ty_ );
0232 
0233   DrawableAffine ( void );
0234 
0235   /*virtual*/ ~DrawableAffine( void );
0236 
0237   // Operator to invoke equivalent draw API call
0238   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0239 
0240   // Return polymorphic copy of object
0241   /*virtual*/
0242   DrawableBase* copy() const;
0243 
0244   void sx( const double sx_ )
0245     {
0246       _affine.sx = sx_;
0247     }
0248   double sx( void ) const
0249     {
0250       return _affine.sx;
0251     }
0252 
0253   void sy( const double sy_ )
0254     {
0255       _affine.sy = sy_;
0256     }
0257   double sy( void ) const
0258     {
0259       return _affine.sy;
0260     }
0261 
0262   void rx( const double rx_ )
0263     {
0264       _affine.rx = rx_;
0265     }
0266   double rx( void ) const
0267     {
0268       return _affine.rx;
0269     }
0270 
0271   void ry( const double ry_ )
0272     {
0273       _affine.ry = ry_;
0274     }
0275   double ry( void ) const
0276     {
0277       return _affine.ry;
0278     }
0279 
0280   void tx( const double tx_ )
0281     {
0282       _affine.tx = tx_;
0283     }
0284   double tx( void ) const
0285     {
0286       return _affine.tx;
0287     }
0288 
0289   void ty( const double ty_ )
0290     {
0291       _affine.ty = ty_;
0292     }
0293   double ty( void ) const
0294     {
0295       return _affine.ty;
0296     }
0297 
0298 private:
0299   MagickCore::AffineMatrix  _affine;
0300 };
0301 
0302 // Change pixel alpha value to transparent using PaintMethod
0303 class MagickPPExport DrawableAlpha : public DrawableBase
0304 {
0305 public:
0306 
0307     DrawableAlpha(double x_, double y_,PaintMethod paintMethod_)
0308       : _x(x_),
0309         _y(y_),
0310         _paintMethod(paintMethod_)
0311     {
0312     }
0313 
0314     ~DrawableAlpha(void);
0315 
0316     // Operator to invoke equivalent draw API call
0317     void operator()(MagickCore::DrawingWand *context_) const;
0318 
0319     // Return polymorphic copy of object
0320     DrawableBase* copy() const;
0321 
0322     void x(double x_)
0323     {
0324       _x=x_;
0325     }
0326 
0327     double x(void) const
0328     {
0329       return(_x);
0330     }
0331 
0332     void y(double y_)
0333     {
0334       _y=y_;
0335     }
0336 
0337     double y(void) const
0338     {
0339       return(_y);
0340     }
0341 
0342     void paintMethod(PaintMethod paintMethod_)
0343     {
0344       _paintMethod=paintMethod_;
0345     }
0346 
0347     PaintMethod paintMethod(void) const
0348     {
0349       return(_paintMethod);
0350     }
0351 
0352   private:
0353 
0354     double _x;
0355     double _y;
0356     PaintMethod _paintMethod;
0357 };
0358 
0359 // Arc
0360 class MagickPPExport DrawableArc : public DrawableBase
0361 {
0362 public:
0363   DrawableArc ( double startX_, double startY_,
0364                 double endX_, double endY_,
0365                 double startDegrees_, double endDegrees_ )
0366     : _startX(startX_),
0367       _startY(startY_),
0368       _endX(endX_),
0369       _endY(endY_),
0370       _startDegrees(startDegrees_),
0371       _endDegrees(endDegrees_)
0372     { }
0373 
0374   /*virtual*/ ~DrawableArc( void );
0375 
0376   // Operator to invoke equivalent draw API call
0377   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0378 
0379   // Return polymorphic copy of object
0380   /*virtual*/ DrawableBase* copy() const;
0381 
0382   void startX( double startX_ )
0383     {
0384       _startX = startX_;
0385     }
0386   double startX( void ) const
0387     {
0388       return _startX;
0389     }
0390 
0391   void startY( double startY_ )
0392     {
0393       _startY = startY_;
0394     }
0395   double startY( void ) const
0396     {
0397       return _startY;
0398     }
0399 
0400   void endX( double endX_ )
0401     {
0402       _endX = endX_;
0403     }
0404   double endX( void ) const
0405     {
0406       return _endX;
0407     }
0408 
0409   void endY( double endY_ )
0410     {
0411       _endY = endY_;
0412     }
0413   double endY( void ) const
0414     {
0415       return _endY;
0416     }
0417 
0418   void startDegrees( double startDegrees_ )
0419     {
0420       _startDegrees = startDegrees_;
0421     }
0422   double startDegrees( void ) const
0423     {
0424       return _startDegrees;
0425     }
0426 
0427   void endDegrees( double endDegrees_ )
0428     {
0429       _endDegrees = endDegrees_;
0430     }
0431   double endDegrees( void ) const
0432     {
0433       return _endDegrees;
0434     }
0435 
0436 private:
0437   double _startX;
0438   double _startY;
0439   double _endX;
0440   double _endY;
0441   double _startDegrees;
0442   double _endDegrees;
0443 };
0444 
0445 // Bezier curve (Coordinate list must contain at least three members)
0446 class MagickPPExport DrawableBezier : public DrawableBase
0447 {
0448 public:
0449   // Construct from coordinates
0450   DrawableBezier ( const CoordinateList &coordinates_ );
0451 
0452   // Copy constructor
0453   DrawableBezier ( const DrawableBezier& original_ );
0454 
0455   // Destructor
0456   /*virtual*/ ~DrawableBezier ( void );
0457 
0458   // Operator to invoke equivalent draw API call
0459   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0460 
0461   // Return polymorphic copy of object
0462   /*virtual*/ DrawableBase* copy() const;
0463 
0464 private:
0465   CoordinateList _coordinates;
0466 };
0467 
0468   // Sets the border color to be used for drawing bordered objects.
0469   class MagickPPExport DrawableBorderColor : public DrawableBase
0470   {
0471   public:
0472 
0473     DrawableBorderColor(const Color &color_);
0474 
0475     DrawableBorderColor(const DrawableBorderColor &original_);
0476 
0477     ~DrawableBorderColor(void);
0478 
0479     // Operator to invoke equivalent draw API call
0480     void operator()(MagickCore::DrawingWand *context_) const;
0481 
0482     void color(const Color &color_);
0483     Color color(void) const;
0484 
0485     // Return polymorphic copy of object
0486     DrawableBase* copy() const;
0487 
0488   private:
0489     Color _color;
0490   };
0491 
0492   // Sets the polygon fill rule to be used by the clipping path.
0493   class MagickPPExport DrawableClipRule : public DrawableBase
0494   {
0495   public:
0496 
0497     DrawableClipRule(const FillRule fillRule_);
0498 
0499     ~DrawableClipRule(void);
0500 
0501     // Operator to invoke equivalent draw API call
0502     void operator()(MagickCore::DrawingWand *context_) const;
0503 
0504     void fillRule(const FillRule fillRule_);
0505     FillRule fillRule(void) const;
0506 
0507     // Return polymorphic copy of object
0508     DrawableBase* copy() const;
0509 
0510   private:
0511     FillRule _fillRule;
0512   };
0513 
0514   // Sets the interpretation of clip path units.
0515   class MagickPPExport DrawableClipUnits : public DrawableBase
0516   {
0517   public:
0518 
0519     DrawableClipUnits(const ClipPathUnits units_);
0520 
0521     ~DrawableClipUnits(void);
0522 
0523     // Operator to invoke equivalent draw API call
0524     void operator()(MagickCore::DrawingWand *context_) const;
0525 
0526     void units(const ClipPathUnits units_);
0527     ClipPathUnits units(void) const;
0528 
0529     // Return polymorphic copy of object
0530     DrawableBase* copy() const;
0531 
0532   private:
0533     ClipPathUnits _units;
0534   };
0535 
0536 // Pop (terminate) clip path definition
0537 class MagickPPExport DrawablePopClipPath : public DrawableBase
0538 {
0539 public:
0540   DrawablePopClipPath ( void )
0541     : _dummy(0)
0542     {
0543     }
0544 
0545   /*virtual*/ ~DrawablePopClipPath ( void );
0546 
0547   // Operator to invoke equivalent draw API call
0548   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0549 
0550   // Return polymorphic copy of object
0551   /*virtual*/ DrawableBase* copy() const;
0552 
0553 private:
0554   ::ssize_t   _dummy;
0555 };
0556 
0557 // Push (create) Clip path definition
0558 class MagickPPExport DrawablePushClipPath : public DrawableBase
0559 {
0560 public:
0561   DrawablePushClipPath ( const std::string &id_);
0562 
0563   DrawablePushClipPath ( const DrawablePushClipPath& original_ );
0564 
0565   /*virtual*/ ~DrawablePushClipPath ( void );
0566 
0567   // Operator to invoke equivalent draw API call
0568   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0569 
0570   // Return polymorphic copy of object
0571   /*virtual*/ DrawableBase* copy() const;
0572 
0573 private:
0574   std::string _id;
0575 };
0576 
0577 // Named Clip Path
0578 class MagickPPExport DrawableClipPath : public DrawableBase
0579 {
0580 public:
0581   DrawableClipPath ( const std::string &id_ );
0582   DrawableClipPath ( const DrawableClipPath& original_ );
0583 
0584   /*virtual*/ ~DrawableClipPath ( void );
0585 
0586   // Operator to invoke equivalent draw API call
0587   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0588 
0589   // Return polymorphic copy of object
0590   /*virtual*/ DrawableBase* copy() const;
0591 
0592   void clip_path( const std::string &id_ )
0593     {
0594       _id = id_.c_str(); //multithread safe
0595     }
0596   std::string clip_path( void ) const
0597     {
0598       return _id;
0599     }
0600 
0601 private:
0602   std::string   _id;
0603 };
0604 
0605 // Circle
0606 class MagickPPExport DrawableCircle : public DrawableBase
0607 {
0608 public:
0609   DrawableCircle ( double originX_, double originY_,
0610                    double perimX_, double perimY_ )
0611     : _originX(originX_),
0612       _originY(originY_),
0613       _perimX(perimX_),
0614       _perimY(perimY_)
0615     {
0616     }
0617 
0618   /*virtual*/ ~DrawableCircle ( void );
0619 
0620   // Operator to invoke equivalent draw API call
0621   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0622 
0623   // Return polymorphic copy of object
0624   /*virtual*/ DrawableBase* copy() const;
0625 
0626   void originX( double originX_ )
0627     {
0628       _originX = originX_;
0629     }
0630   double originX( void ) const
0631     {
0632       return _originX;
0633     }
0634 
0635   void originY( double originY_ )
0636     {
0637       _originY = originY_;
0638     }
0639   double originY( void ) const
0640     {
0641       return _originY;
0642     }
0643 
0644   void perimX( double perimX_ )
0645     {
0646       _perimX = perimX_;
0647     }
0648   double perimX( void ) const
0649     {
0650       return _perimX;
0651     }
0652 
0653   void perimY( double perimY_ )
0654     {
0655       _perimY = perimY_;
0656     }
0657   double perimY( void ) const
0658     {
0659       return _perimY;
0660     }
0661 
0662 private:
0663   double _originX;
0664   double _originY;
0665   double _perimX;
0666   double _perimY;
0667 };
0668 
0669 // Colorize at point using PaintMethod
0670 class MagickPPExport DrawableColor : public DrawableBase
0671 {
0672 public:
0673   DrawableColor ( double x_, double y_,
0674                   PaintMethod paintMethod_ )
0675     : _x(x_),
0676       _y(y_),
0677       _paintMethod(paintMethod_)
0678     { }
0679 
0680   /*virtual*/ ~DrawableColor ( void );
0681 
0682   // Operator to invoke equivalent draw API call
0683   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0684 
0685   // Return polymorphic copy of object
0686   /*virtual*/ DrawableBase* copy() const;
0687 
0688   void x( double x_ )
0689     {
0690       _x = x_;
0691     }
0692   double x( void ) const
0693     {
0694       return _x;
0695     }
0696 
0697   void y( double y_ )
0698     {
0699       _y = y_;
0700     }
0701   double y( void ) const
0702     {
0703       return _y;
0704     }
0705 
0706   void paintMethod( PaintMethod paintMethod_ )
0707     {
0708       _paintMethod = paintMethod_;
0709     }
0710   PaintMethod paintMethod( void ) const
0711     {
0712       return _paintMethod;
0713     }
0714 
0715 private:
0716   double _x;
0717   double _y;
0718   PaintMethod _paintMethod;
0719 };
0720 
0721 // Draw image at point, scaled to size specified by width and height
0722 class MagickPPExport Image;
0723 class MagickPPExport DrawableCompositeImage : public DrawableBase
0724 {
0725 public:
0726   DrawableCompositeImage ( double x_, double y_,
0727                            const std::string &filename_ );
0728 
0729   DrawableCompositeImage ( double x_, double y_,
0730                            const Image &image_ );
0731 
0732   DrawableCompositeImage ( double x_, double y_,
0733                            double width_, double height_,
0734                            const std::string &filename_ );
0735 
0736   DrawableCompositeImage ( double x_, double y_,
0737                            double width_, double height_,
0738                            const Image &image_ );
0739 
0740   DrawableCompositeImage ( double x_, double y_,
0741                            double width_, double height_,
0742                            const std::string &filename_,
0743                            CompositeOperator composition_ );
0744 
0745   DrawableCompositeImage ( double x_, double y_,
0746                            double width_, double height_,
0747                            const Image &image_,
0748                            CompositeOperator composition_ );
0749 
0750   // Copy constructor
0751   DrawableCompositeImage ( const DrawableCompositeImage& original_ );
0752 
0753   // Destructor
0754   /*virtual*/ ~DrawableCompositeImage( void );
0755 
0756   // Assignment operator
0757   DrawableCompositeImage& operator=
0758   (const DrawableCompositeImage& original_ );
0759 
0760   // Operator to invoke equivalent draw API call
0761   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0762 
0763   // Return polymorphic copy of object
0764   /*virtual*/ DrawableBase* copy() const;
0765 
0766   void composition( CompositeOperator composition_ )
0767     {
0768       _composition = composition_;
0769     }
0770   CompositeOperator composition( void ) const
0771     {
0772       return _composition;
0773     }
0774 
0775   void filename( const std::string &image_ );
0776   std::string filename( void ) const;
0777 
0778   void x( double x_ )
0779     {
0780       _x = x_;
0781     }
0782   double x( void ) const
0783     {
0784       return _x;
0785     }
0786 
0787   void y( double y_ )
0788     {
0789       _y = y_;
0790     }
0791   double y( void ) const
0792     {
0793       return _y;
0794     }
0795 
0796   void width( double width_ )
0797     {
0798       _width = width_;
0799     }
0800   double width( void ) const
0801     {
0802       return _width;
0803     }
0804 
0805   void height( double height_ )
0806     {
0807       _height = height_;
0808     }
0809   double height( void ) const
0810     {
0811       return _height;
0812     }
0813 
0814   void image( const Image &image_ );
0815   Magick::Image image( void ) const;
0816 
0817   // Specify image format used to output Base64 inlined image data.
0818   void magick( std::string magick_ );
0819   std::string magick( void );
0820 
0821 private:
0822   CompositeOperator  _composition;
0823   double             _x;
0824   double             _y;
0825   double             _width;
0826   double             _height;
0827   Image*             _image;
0828 };
0829 
0830 // Density
0831 class MagickPPExport DrawableDensity : public DrawableBase
0832 {
0833 public:
0834 
0835   DrawableDensity(const Point &density_);
0836 
0837   DrawableDensity(const std::string &density_);
0838 
0839   ~DrawableDensity(void);
0840 
0841   void operator()(MagickCore::DrawingWand *context_) const;
0842 
0843   DrawableBase* copy() const;
0844 
0845 private:
0846   std::string _density;
0847 };
0848 
0849 // Ellipse
0850 class MagickPPExport DrawableEllipse : public DrawableBase
0851 {
0852 public:
0853   DrawableEllipse ( double originX_, double originY_,
0854                     double radiusX_, double radiusY_,
0855                     double arcStart_, double arcEnd_ )
0856     : _originX(originX_),
0857       _originY(originY_),
0858       _radiusX(radiusX_),
0859       _radiusY(radiusY_),
0860       _arcStart(arcStart_),
0861       _arcEnd(arcEnd_)
0862     { }
0863 
0864   /*virtual*/ ~DrawableEllipse( void );
0865 
0866   // Operator to invoke equivalent draw API call
0867   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0868 
0869   // Return polymorphic copy of object
0870   /*virtual*/ DrawableBase* copy() const;
0871 
0872   void originX( double originX_ )
0873     {
0874       _originX = originX_;
0875     }
0876   double originX( void ) const
0877     {
0878       return _originX;
0879     }
0880 
0881   void originY( double originY_ )
0882     {
0883       _originY = originY_;
0884     }
0885   double originY( void ) const
0886     {
0887       return _originY;
0888     }
0889 
0890   void radiusX( double radiusX_ )
0891     {
0892       _radiusX = radiusX_;
0893     }
0894   double radiusX( void ) const
0895     {
0896       return _radiusX;
0897     }
0898 
0899   void radiusY( double radiusY_ )
0900     {
0901       _radiusY = radiusY_;
0902     }
0903   double radiusY( void ) const
0904     {
0905       return _radiusY;
0906     }
0907 
0908   void arcStart( double arcStart_ )
0909     {
0910       _arcStart = arcStart_;
0911     }
0912   double arcStart( void ) const
0913     {
0914       return _arcStart;
0915     }
0916 
0917   void arcEnd( double arcEnd_ )
0918     {
0919       _arcEnd = arcEnd_;
0920     }
0921   double arcEnd( void ) const
0922     {
0923       return _arcEnd;
0924     }
0925 
0926 private:
0927   double _originX;
0928   double _originY;
0929   double _radiusX;
0930   double _radiusY;
0931   double _arcStart;
0932   double _arcEnd;
0933 };
0934 
0935 // Specify drawing fill color
0936 class MagickPPExport DrawableFillColor : public DrawableBase
0937 {
0938 public:
0939   DrawableFillColor ( const Color &color_ );
0940 
0941   DrawableFillColor ( const DrawableFillColor& original_ );
0942 
0943   /*virtual*/ ~DrawableFillColor( void );
0944 
0945   // Operator to invoke equivalent draw API call
0946   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
0947 
0948   // Return polymorphic copy of object
0949   /*virtual*/ DrawableBase* copy() const;
0950 
0951   void color( const Color &color_ )
0952     {
0953       _color = color_;
0954     }
0955   Color color( void ) const
0956     {
0957       return _color;
0958     }
0959 
0960 private:
0961   Color _color;
0962 };
0963 
0964   // Sets the URL to use as a fill pattern for filling objects. Only local
0965   // URLs("#identifier") are supported at this time. These local URLs are
0966   // normally created by defining a named fill pattern with
0967   // DrawablePushPattern/DrawablePopPattern.
0968   class MagickPPExport DrawableFillPatternUrl : public DrawableBase
0969   {
0970   public:
0971 
0972     DrawableFillPatternUrl(const std::string &url_);
0973 
0974     ~DrawableFillPatternUrl(void);
0975 
0976     DrawableFillPatternUrl(const DrawableFillPatternUrl& original_);
0977 
0978     // Operator to invoke equivalent draw API call
0979     void operator()(MagickCore::DrawingWand *context_) const;
0980 
0981     void url(const std::string &url_);
0982     std::string url(void) const;
0983 
0984     // Return polymorphic copy of object
0985     DrawableBase* copy() const;
0986 
0987   private:
0988     std::string _url;
0989   };
0990 
0991 // Specify fill rule (fill-rule)
0992 class MagickPPExport DrawableFillRule : public DrawableBase
0993 {
0994 public:
0995   DrawableFillRule ( const FillRule fillRule_ )
0996     : _fillRule(fillRule_)
0997     {
0998     }
0999 
1000   /*virtual*/ ~DrawableFillRule ( void );
1001 
1002   // Operator to invoke equivalent draw API call
1003   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1004 
1005   // Return polymorphic copy of object
1006   /*virtual*/ DrawableBase* copy() const;
1007 
1008   void fillRule( const FillRule fillRule_ )
1009     {
1010       _fillRule = fillRule_;
1011     }
1012   FillRule fillRule( void ) const
1013     {
1014       return _fillRule;
1015     }
1016 
1017 private:
1018   FillRule _fillRule;
1019 };
1020 
1021 // Specify drawing fill alpha
1022 class MagickPPExport DrawableFillOpacity : public DrawableBase
1023 {
1024 public:
1025 
1026   DrawableFillOpacity(double opacity_)
1027     : _opacity(opacity_)
1028   {
1029   }
1030 
1031   ~DrawableFillOpacity ( void );
1032 
1033   // Operator to invoke equivalent draw API call
1034   void operator()(MagickCore::DrawingWand *context_) const;
1035 
1036   // Return polymorphic copy of object
1037   DrawableBase* copy() const;
1038 
1039   void opacity(double opacity_)
1040   {
1041     _opacity=opacity_;
1042   }
1043 
1044   double opacity(void) const
1045   {
1046     return(_opacity);
1047   }
1048 
1049 private:
1050   double _opacity;
1051 };
1052 
1053 // Specify text font
1054 class MagickPPExport DrawableFont : public DrawableBase
1055 {
1056 public:
1057   DrawableFont ( const std::string &font_ );
1058 
1059   DrawableFont ( const std::string &family_,
1060                  StyleType style_,
1061                  const unsigned int weight_,
1062                  StretchType stretch_ );
1063   DrawableFont ( const DrawableFont& original_ );
1064 
1065   /*virtual*/ ~DrawableFont ( void );
1066 
1067   // Operator to invoke equivalent draw API call
1068   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1069 
1070   // Return polymorphic copy of object
1071   /*virtual*/ DrawableBase* copy() const;
1072 
1073   void font( const std::string &font_ )
1074     {
1075       _font = font_;
1076     }
1077   std::string font( void ) const
1078     {
1079       return _font;
1080     }
1081 
1082 private:
1083   std::string   _font;
1084   std::string   _family;
1085   StyleType     _style;
1086   unsigned int _weight;
1087   StretchType   _stretch;
1088 };
1089 
1090 // Specify text positioning gravity
1091 class MagickPPExport DrawableGravity : public DrawableBase
1092 {
1093 public:
1094   DrawableGravity ( GravityType gravity_ )
1095     : _gravity(gravity_)
1096     {
1097     }
1098 
1099   /*virtual*/ ~DrawableGravity ( void );
1100 
1101   // Operator to invoke equivalent draw API call
1102   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1103 
1104   // Return polymorphic copy of object
1105   /*virtual*/ DrawableBase* copy() const;
1106 
1107   void gravity( GravityType gravity_ )
1108     {
1109       _gravity = gravity_;
1110     }
1111   GravityType gravity( void ) const
1112     {
1113       return _gravity;
1114     }
1115 
1116 private:
1117   GravityType _gravity;
1118 };
1119 
1120 // Line
1121 class MagickPPExport DrawableLine : public DrawableBase
1122 {
1123 public:
1124   DrawableLine ( double startX_, double startY_,
1125                  double endX_, double endY_ )
1126     : _startX(startX_),
1127       _startY(startY_),
1128       _endX(endX_),
1129       _endY(endY_)
1130     { }
1131 
1132   /*virtual*/ ~DrawableLine ( void );
1133 
1134   // Operator to invoke equivalent draw API call
1135   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1136 
1137   // Return polymorphic copy of object
1138   /*virtual*/ DrawableBase* copy() const;
1139 
1140   void startX( double startX_ )
1141     {
1142       _startX = startX_;
1143     }
1144   double startX( void ) const
1145     {
1146       return _startX;
1147     }
1148 
1149   void startY( double startY_ )
1150     {
1151       _startY = startY_;
1152     }
1153   double startY( void ) const
1154     {
1155       return _startY;
1156     }
1157 
1158   void endX( double endX_ )
1159     {
1160       _endX = endX_;
1161     }
1162   double endX( void ) const
1163     {
1164       return _endX;
1165     }
1166 
1167   void endY( double endY_ )
1168     {
1169       _endY = endY_;
1170     }
1171   double endY( void ) const
1172     {
1173       return _endY;
1174     }
1175 
1176 private:
1177   double _startX;
1178   double _startY;
1179   double _endX;
1180   double _endY;
1181 };
1182 
1183 // Drawable Path
1184 class MagickPPExport DrawablePath : public DrawableBase
1185 {
1186 public:
1187   DrawablePath ( const VPathList &path_ );
1188 
1189   DrawablePath ( const DrawablePath& original_ );
1190 
1191   /*virtual*/ ~DrawablePath ( void );
1192 
1193   // Operator to invoke equivalent draw API call
1194   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1195 
1196   // Return polymorphic copy of object
1197   /*virtual*/ DrawableBase* copy() const;
1198 
1199 private:
1200   VPathList _path;
1201 };
1202 
1203 // Point
1204 class MagickPPExport DrawablePoint : public DrawableBase
1205 {
1206 public:
1207   DrawablePoint ( double x_, double y_ )
1208     : _x(x_),
1209       _y(y_)
1210     { }
1211 
1212   /*virtual*/ ~DrawablePoint ( void );
1213 
1214   // Operator to invoke equivalent draw API call
1215   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1216 
1217   // Return polymorphic copy of object
1218   /*virtual*/ DrawableBase* copy() const;
1219 
1220   void x( double x_ )
1221     {
1222       _x = x_;
1223     }
1224   double x( void ) const
1225     {
1226       return _x;
1227     }
1228 
1229   void y( double y_ )
1230     {
1231       _y = y_;
1232     }
1233   double y( void ) const
1234     {
1235       return _y;
1236     }
1237 
1238 private:
1239   double _x;
1240   double _y;
1241 };
1242 
1243 // Text pointsize
1244 class MagickPPExport DrawablePointSize : public DrawableBase
1245 {
1246 public:
1247   DrawablePointSize ( double pointSize_ )
1248     : _pointSize(pointSize_)
1249     { }
1250 
1251   /*virtual*/ ~DrawablePointSize ( void );
1252 
1253   // Operator to invoke equivalent draw API call
1254   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1255 
1256   // Return polymorphic copy of object
1257   /*virtual*/ DrawableBase* copy() const;
1258 
1259   void pointSize( double pointSize_ )
1260     {
1261       _pointSize = pointSize_;
1262     }
1263   double pointSize( void ) const
1264     {
1265       return _pointSize;
1266     }
1267 
1268 private:
1269   double _pointSize;
1270 };
1271 
1272 // Polygon (Coordinate list must contain at least three members)
1273 class MagickPPExport DrawablePolygon : public DrawableBase
1274 {
1275 public:
1276   DrawablePolygon ( const CoordinateList &coordinates_ );
1277 
1278   DrawablePolygon ( const DrawablePolygon& original_ );
1279 
1280   /*virtual*/ ~DrawablePolygon ( void );
1281 
1282   // Operator to invoke equivalent draw API call
1283   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1284 
1285   // Return polymorphic copy of object
1286   /*virtual*/ DrawableBase* copy() const;
1287 
1288 private:
1289   CoordinateList _coordinates;
1290 };
1291 
1292 // Polyline (Coordinate list must contain at least three members)
1293 class MagickPPExport DrawablePolyline : public DrawableBase
1294 {
1295 public:
1296   DrawablePolyline ( const CoordinateList &coordinates_ );
1297 
1298   DrawablePolyline ( const DrawablePolyline& original_ );
1299 
1300   /*virtual*/ ~DrawablePolyline ( void );
1301 
1302   // Operator to invoke equivalent draw API call
1303   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1304 
1305   // Return polymorphic copy of object
1306   /*virtual*/ DrawableBase* copy() const;
1307 
1308 private:
1309   CoordinateList _coordinates;
1310 };
1311 
1312 // Pop Graphic Context
1313 class MagickPPExport DrawablePopGraphicContext : public DrawableBase
1314 {
1315 public:
1316   DrawablePopGraphicContext ( void )
1317     : _dummy(0)
1318     {
1319     }
1320 
1321   /*virtual*/ ~DrawablePopGraphicContext ( void );
1322 
1323   // Operator to invoke equivalent draw API call
1324   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1325 
1326   // Return polymorphic copy of object
1327   /*virtual*/ DrawableBase* copy() const;
1328 
1329 private:
1330   ::ssize_t   _dummy;
1331 };
1332 
1333 // Push Graphic Context
1334 class MagickPPExport DrawablePushGraphicContext : public DrawableBase
1335 {
1336 public:
1337   DrawablePushGraphicContext ( void )
1338     : _dummy(0)
1339     {
1340     }
1341 
1342   /*virtual*/ ~DrawablePushGraphicContext ( void );
1343 
1344   // Operator to invoke equivalent draw API call
1345   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1346 
1347   // Return polymorphic copy of object
1348   /*virtual*/ DrawableBase* copy() const;
1349 
1350 private:
1351   ::ssize_t   _dummy;
1352 };
1353 
1354 // Pop (terminate) Pattern definition
1355 class MagickPPExport DrawablePopPattern : public DrawableBase
1356 {
1357 public:
1358   DrawablePopPattern ( void )
1359     : _dummy(0)
1360     {
1361     }
1362 
1363   /*virtual*/ ~DrawablePopPattern ( void );
1364 
1365   // Operator to invoke equivalent draw API call
1366   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1367 
1368   // Return polymorphic copy of object
1369   /*virtual*/ DrawableBase* copy() const;
1370 
1371 private:
1372   ::ssize_t   _dummy;
1373 };
1374 
1375 // Push (create) Pattern definition
1376 class MagickPPExport DrawablePushPattern : public DrawableBase
1377 {
1378 public:
1379   DrawablePushPattern ( const std::string &id_, ::ssize_t x_, ::ssize_t y_,
1380                         size_t width_, size_t height_ );
1381 
1382   DrawablePushPattern ( const DrawablePushPattern& original_ );
1383 
1384   /*virtual*/ ~DrawablePushPattern ( void );
1385 
1386   // Operator to invoke equivalent draw API call
1387   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1388 
1389   // Return polymorphic copy of object
1390   /*virtual*/ DrawableBase* copy() const;
1391 
1392 private:
1393   std::string         _id;
1394   ::ssize_t     _x;
1395   ::ssize_t     _y;
1396   size_t        _width;
1397   size_t        _height;
1398 };
1399 
1400 // Rectangle
1401 class MagickPPExport DrawableRectangle : public DrawableBase
1402 {
1403 public:
1404   DrawableRectangle ( double upperLeftX_, double upperLeftY_,
1405                       double lowerRightX_, double lowerRightY_ )
1406     : _upperLeftX(upperLeftX_),
1407       _upperLeftY(upperLeftY_),
1408       _lowerRightX(lowerRightX_),
1409       _lowerRightY(lowerRightY_)
1410     { }
1411 
1412   /*virtual*/ ~DrawableRectangle ( void );
1413 
1414   // Operator to invoke equivalent draw API call
1415   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1416 
1417   // Return polymorphic copy of object
1418   /*virtual*/ DrawableBase* copy() const;
1419 
1420   void upperLeftX( double upperLeftX_ )
1421     {
1422       _upperLeftX = upperLeftX_;
1423     }
1424   double upperLeftX( void ) const
1425     {
1426       return _upperLeftX;
1427     }
1428 
1429   void upperLeftY( double upperLeftY_ )
1430     {
1431       _upperLeftY = upperLeftY_;
1432     }
1433   double upperLeftY( void ) const
1434     {
1435       return _upperLeftY;
1436     }
1437 
1438   void lowerRightX( double lowerRightX_ )
1439     {
1440       _lowerRightX = lowerRightX_;
1441     }
1442   double lowerRightX( void ) const
1443     {
1444       return _lowerRightX;
1445     }
1446 
1447   void lowerRightY( double lowerRightY_ )
1448     {
1449       _lowerRightY = lowerRightY_;
1450     }
1451   double lowerRightY( void ) const
1452     {
1453       return _lowerRightY;
1454     }
1455 
1456 private:
1457   double _upperLeftX;
1458   double _upperLeftY;
1459   double _lowerRightX;
1460   double _lowerRightY;
1461 };
1462 
1463 // Apply Rotation
1464 class MagickPPExport DrawableRotation : public DrawableBase
1465 {
1466 public:
1467   DrawableRotation ( double angle_ )
1468     : _angle( angle_ )
1469     { }
1470 
1471   /*virtual*/ ~DrawableRotation ( void );
1472 
1473   // Operator to invoke equivalent draw API call
1474   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1475 
1476   // Return polymorphic copy of object
1477   /*virtual*/ DrawableBase* copy() const;
1478 
1479   void angle( double angle_ )
1480     {
1481       _angle = angle_;
1482     }
1483   double angle( void ) const
1484     {
1485       return _angle;
1486     }
1487 
1488 private:
1489   double _angle;
1490 };
1491 
1492 // Round Rectangle
1493 class MagickPPExport DrawableRoundRectangle : public DrawableBase
1494 {
1495 public:
1496   DrawableRoundRectangle ( double upperLeftX_, double upperLeftY_,
1497                            double lowerRightX_, double lowerRightY_,
1498                            double cornerWidth_, double cornerHeight_ )
1499     : _upperLeftX(upperLeftX_),
1500       _upperLeftY(upperLeftY_),
1501       _lowerRightX(lowerRightX_),
1502       _lowerRightY(lowerRightY_),
1503       _cornerWidth(cornerWidth_),
1504       _cornerHeight(cornerHeight_)
1505     { }
1506 
1507   /*virtual*/ ~DrawableRoundRectangle ( void );
1508 
1509   // Operator to invoke equivalent draw API call
1510   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1511 
1512   // Return polymorphic copy of object
1513   /*virtual*/ DrawableBase* copy() const;
1514 
1515 #if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
1516 
1517   void centerX( double centerX_ )
1518     {
1519       _upperLeftX = centerX_;
1520     }
1521   double centerX( void ) const
1522     {
1523       return _upperLeftX;
1524     }
1525 
1526   void centerY( double centerY_ )
1527     {
1528       _upperLeftY = centerY_;
1529     }
1530   double centerY( void ) const
1531     {
1532       return _upperLeftY;
1533     }
1534 
1535   void width( double width_ )
1536     {
1537       _lowerRightX = width_;
1538     }
1539   double width( void ) const
1540     {
1541       return _lowerRightX;
1542     }
1543 
1544   void hight( double hight_ )
1545     {
1546       _lowerRightY = hight_;
1547     }
1548   double hight( void ) const
1549     {
1550       return _lowerRightY;
1551     }
1552 
1553 #endif
1554 
1555   void upperLeftX( double upperLeftX_ )
1556     {
1557       _upperLeftX = upperLeftX_;
1558     }
1559   double upperLeftX( void ) const
1560     {
1561       return _upperLeftX;
1562     }
1563 
1564   void upperLeftY( double upperLeftY_ )
1565     {
1566       _upperLeftY = upperLeftY_;
1567     }
1568   double upperLeftY( void ) const
1569     {
1570       return _upperLeftY;
1571     }
1572 
1573   void lowerRightX( double lowerRightX_ )
1574     {
1575       _lowerRightX = lowerRightX_;
1576     }
1577   double lowerRightX( void ) const
1578     {
1579       return _lowerRightX;
1580     }
1581 
1582   void lowerRightY( double lowerRightY_ )
1583     {
1584       _lowerRightY = lowerRightY_;
1585     }
1586   double lowerRightY( void ) const
1587     {
1588       return _lowerRightY;
1589     }
1590 
1591   void cornerWidth( double cornerWidth_ )
1592     {
1593       _cornerWidth = cornerWidth_;
1594     }
1595   double cornerWidth( void ) const
1596     {
1597       return _cornerWidth;
1598     }
1599 
1600   void cornerHeight( double cornerHeight_ )
1601     {
1602       _cornerHeight = cornerHeight_;
1603     }
1604   double cornerHeight( void ) const
1605     {
1606       return _cornerHeight;
1607     }
1608 
1609 private:
1610   double _upperLeftX;
1611   double _upperLeftY;
1612   double _lowerRightX;
1613   double _lowerRightY;
1614   double _cornerWidth;
1615   double _cornerHeight;
1616 };
1617 
1618 // Apply Scaling
1619 class MagickPPExport DrawableScaling : public DrawableBase
1620 {
1621 public:
1622   DrawableScaling ( double x_, double y_ )
1623     : _x(x_),
1624       _y(y_)
1625     { }
1626 
1627   /*virtual*/ ~DrawableScaling ( void );
1628 
1629   // Operator to invoke equivalent draw API call
1630   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1631 
1632   // Return polymorphic copy of object
1633   /*virtual*/ DrawableBase* copy() const;
1634 
1635   void x( double x_ )
1636     {
1637       _x = x_;
1638     }
1639   double x( void ) const
1640     {
1641       return _x;
1642     }
1643 
1644   void y( double y_ )
1645     {
1646       _y = y_;
1647     }
1648   double y( void ) const
1649     {
1650       return _y;
1651     }
1652 
1653 private:
1654   double _x;
1655   double _y;
1656 };
1657 
1658 // Apply Skew in X direction
1659 class MagickPPExport DrawableSkewX : public DrawableBase
1660 {
1661 public:
1662   DrawableSkewX ( double angle_ )
1663     : _angle(angle_)
1664     { }
1665 
1666   /*virtual*/ ~DrawableSkewX ( void );
1667 
1668   // Operator to invoke equivalent draw API call
1669   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1670 
1671   // Return polymorphic copy of object
1672   /*virtual*/ DrawableBase* copy() const;
1673 
1674   void angle( double angle_ )
1675     {
1676       _angle = angle_;
1677     }
1678   double angle( void ) const
1679     {
1680       return _angle;
1681     }
1682 
1683 private:
1684   double _angle;
1685 };
1686 
1687 // Apply Skew in Y direction
1688 class MagickPPExport DrawableSkewY : public DrawableBase
1689 {
1690 public:
1691   DrawableSkewY ( double angle_ )
1692     : _angle(angle_)
1693     { }
1694 
1695   /*virtual*/ ~DrawableSkewY ( void );
1696 
1697   // Operator to invoke equivalent draw API call
1698   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1699 
1700   // Return polymorphic copy of object
1701   /*virtual*/ DrawableBase* copy() const;
1702 
1703   void angle( double angle_ )
1704     {
1705       _angle = angle_;
1706     }
1707   double angle( void ) const
1708     {
1709       return _angle;
1710     }
1711 
1712 private:
1713   double _angle;
1714 };
1715 
1716   // Stroke dasharray
1717   //
1718   // dasharray_ is an allocated array terminated by value 0.0 or 0.
1719   // The array is copied so the original does not need to be preserved.
1720   // Pass a null pointer to clear an existing dash array setting.
1721   class MagickPPExport DrawableStrokeDashArray : public DrawableBase
1722   {
1723   public:
1724 
1725       DrawableStrokeDashArray(const double* dasharray_);
1726 
1727       DrawableStrokeDashArray(const Magick::DrawableStrokeDashArray &original_);
1728 
1729       ~DrawableStrokeDashArray(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 dasharray(const double* dasharray_);
1738       const double* dasharray(void) const;
1739 
1740       DrawableStrokeDashArray& operator=(
1741         const Magick::DrawableStrokeDashArray &original_);
1742 
1743   private:
1744       size_t _size;
1745       double *_dasharray;
1746   };
1747 
1748   // Stroke dashoffset
1749   class MagickPPExport DrawableStrokeDashOffset : public DrawableBase
1750   {
1751   public:
1752     DrawableStrokeDashOffset(const double offset_)
1753       : _offset(offset_)
1754       { }
1755 
1756      ~DrawableStrokeDashOffset(void);
1757 
1758     // Operator to invoke equivalent draw API call
1759     void operator()(MagickCore::DrawingWand *context_) const;
1760 
1761     // Return polymorphic copy of object
1762     DrawableBase* copy() const;
1763 
1764     void offset(const double offset_);
1765     double offset(void) const;
1766 
1767   private:
1768     double _offset;
1769   };
1770 
1771 // Stroke linecap
1772 class MagickPPExport DrawableStrokeLineCap : public DrawableBase
1773 {
1774 public:
1775   DrawableStrokeLineCap ( LineCap linecap_ )
1776     : _linecap(linecap_)
1777     { }
1778 
1779   /*virtual*/ ~DrawableStrokeLineCap ( void );
1780 
1781   // Operator to invoke equivalent draw API call
1782   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1783 
1784   // Return polymorphic copy of object
1785   /*virtual*/ DrawableBase* copy() const;
1786 
1787   void linecap( LineCap linecap_ )
1788     {
1789       _linecap = linecap_;
1790     }
1791   LineCap linecap( void ) const
1792     {
1793       return _linecap;
1794     }
1795 
1796 private:
1797   LineCap _linecap;
1798 };
1799 
1800 // Stroke linejoin
1801 class MagickPPExport DrawableStrokeLineJoin : public DrawableBase
1802 {
1803 public:
1804   DrawableStrokeLineJoin ( LineJoin linejoin_ )
1805     : _linejoin(linejoin_)
1806     { }
1807 
1808   /*virtual*/ ~DrawableStrokeLineJoin ( void );
1809 
1810   // Operator to invoke equivalent draw API call
1811   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1812 
1813   // Return polymorphic copy of object
1814   /*virtual*/ DrawableBase* copy() const;
1815 
1816   void linejoin( LineJoin linejoin_ )
1817     {
1818       _linejoin = linejoin_;
1819     }
1820   LineJoin linejoin( void ) const
1821     {
1822       return _linejoin;
1823     }
1824 
1825 private:
1826   LineJoin _linejoin;
1827 };
1828 
1829 // Stroke miterlimit
1830 class MagickPPExport DrawableMiterLimit : public DrawableBase
1831 {
1832 public:
1833   DrawableMiterLimit ( size_t miterlimit_ )
1834     : _miterlimit(miterlimit_)
1835     { }
1836 
1837   /*virtual*/ ~DrawableMiterLimit ( void );
1838 
1839   // Operator to invoke equivalent draw API call
1840   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1841 
1842   // Return polymorphic copy of object
1843   /*virtual*/ DrawableBase* copy() const;
1844 
1845   void miterlimit( size_t miterlimit_ )
1846     {
1847       _miterlimit = miterlimit_;
1848     }
1849   size_t miterlimit( void ) const
1850     {
1851       return _miterlimit;
1852     }
1853 
1854 private:
1855   size_t _miterlimit;
1856 };
1857 
1858 // Sets the pattern used for stroking object outlines.
1859 class MagickPPExport DrawableStrokePatternUrl : public DrawableBase
1860 {
1861 public:
1862 
1863   DrawableStrokePatternUrl(const std::string &url_);
1864 
1865   ~DrawableStrokePatternUrl(void);
1866 
1867   DrawableStrokePatternUrl(const DrawableStrokePatternUrl& original_);
1868 
1869   // Operator to invoke equivalent draw API call
1870   void operator()(MagickCore::DrawingWand *context_) const;
1871 
1872   void url(const std::string &url_);
1873   std::string url(void) const;
1874 
1875   // Return polymorphic copy of object
1876   DrawableBase* copy() const;
1877 
1878 private:
1879   std::string _url;
1880 };
1881 
1882 // Stroke antialias
1883 class MagickPPExport DrawableStrokeAntialias : public DrawableBase
1884 {
1885 public:
1886   DrawableStrokeAntialias ( bool flag_ )
1887     : _flag(flag_)
1888     { }
1889 
1890   /*virtual*/ ~DrawableStrokeAntialias ( void );
1891 
1892   // Operator to invoke equivalent draw API call
1893   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1894 
1895   // Return polymorphic copy of object
1896   /*virtual*/ DrawableBase* copy() const;
1897 
1898   void flag( bool flag_ )
1899     {
1900       _flag = flag_;
1901     }
1902   bool flag( void ) const
1903     {
1904       return _flag;
1905     }
1906 
1907 private:
1908   bool _flag;
1909 };
1910 
1911 // Stroke color
1912 class MagickPPExport DrawableStrokeColor : public DrawableBase
1913 {
1914 public:
1915   DrawableStrokeColor ( const Color &color_ );
1916 
1917   DrawableStrokeColor ( const DrawableStrokeColor& original_ );
1918 
1919   /*virtual*/ ~DrawableStrokeColor ( void );
1920 
1921   // Operator to invoke equivalent draw API call
1922   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1923 
1924   // Return polymorphic copy of object
1925   /*virtual*/ DrawableBase* copy() const;
1926 
1927   void color( const Color& color_ )
1928     {
1929       _color = color_;
1930     }
1931   Color color( void ) const
1932     {
1933       return _color;
1934     }
1935 
1936 private:
1937   Color _color;
1938 };
1939 
1940 // Stroke opacity
1941 class MagickPPExport DrawableStrokeOpacity : public DrawableBase
1942 {
1943 public:
1944 
1945   DrawableStrokeOpacity(double opacity_)
1946     : _opacity(opacity_)
1947   {
1948   }
1949 
1950   ~DrawableStrokeOpacity(void);
1951 
1952   // Operator to invoke equivalent draw API call
1953   void operator()(MagickCore::DrawingWand *context_) const;
1954 
1955   // Return polymorphic copy of object
1956   DrawableBase* copy() const;
1957 
1958   void opacity(double opacity_)
1959   {
1960     _opacity=opacity_;
1961   }
1962 
1963   double opacity(void) const
1964   {
1965     return(_opacity);
1966   }
1967 
1968 private:
1969   double _opacity;
1970 };
1971 
1972 // Stroke width
1973 class MagickPPExport DrawableStrokeWidth : public DrawableBase
1974 {
1975 public:
1976   DrawableStrokeWidth ( double width_ )
1977     : _width(width_)
1978     { }
1979 
1980   /*virtual*/ ~DrawableStrokeWidth ( void );
1981 
1982   // Operator to invoke equivalent draw API call
1983   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
1984 
1985   // Return polymorphic copy of object
1986   /*virtual*/ DrawableBase* copy() const;
1987 
1988   void width( double width_ )
1989     {
1990       _width = width_;
1991     }
1992   double width( void ) const
1993     {
1994       return _width;
1995     }
1996 
1997 private:
1998   double _width;
1999 };
2000 
2001 // Draw text at point
2002 class MagickPPExport DrawableText : public DrawableBase
2003 {
2004 public:
2005   DrawableText ( const double x_, const double y_,
2006                  const std::string &text_ );
2007   DrawableText ( const double x_, const double y_,
2008                  const std::string &text_, const std::string &encoding_);
2009 
2010   DrawableText ( const DrawableText& original_ );
2011 
2012   /*virtual*/ ~DrawableText ( void );
2013 
2014   // Operator to invoke equivalent draw API call
2015   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2016 
2017   // Return polymorphic copy of object
2018   /*virtual*/ DrawableBase* copy() const;
2019 
2020   void encoding(const std::string &encoding_)
2021     {
2022       _encoding = encoding_;
2023     }
2024 
2025   void x( double x_ )
2026     {
2027       _x = x_;
2028     }
2029   double x( void ) const
2030     {
2031       return _x;
2032     }
2033 
2034   void y( double y_ )
2035     {
2036       _y = y_;
2037     }
2038   double y( void ) const
2039     {
2040       return _y;
2041     }
2042 
2043   void text( const std::string &text_ )
2044     {
2045       _text = text_;
2046     }
2047   std::string text( void ) const
2048     {
2049       return _text;
2050     }
2051 
2052 private:
2053   double      _x;
2054   double      _y;
2055   std::string _text;
2056   std::string _encoding;
2057 };
2058 
2059 // Text alignment
2060 class MagickPPExport DrawableTextAlignment : public DrawableBase
2061 {
2062 public:
2063 
2064   DrawableTextAlignment(AlignType alignment_);
2065 
2066   DrawableTextAlignment(const DrawableTextAlignment& original_);
2067 
2068   ~DrawableTextAlignment(void);
2069 
2070   // Operator to invoke equivalent draw API call
2071   void operator()(MagickCore::DrawingWand *context_) const;
2072 
2073   void alignment(AlignType alignment_);
2074   AlignType alignment(void) const;
2075 
2076   // Return polymorphic copy of object
2077   DrawableBase* copy() const;
2078 
2079 private:
2080   AlignType _alignment;
2081 };
2082 
2083 // Text antialias
2084 class MagickPPExport DrawableTextAntialias : public DrawableBase
2085 {
2086 public:
2087   DrawableTextAntialias ( bool flag_ );
2088 
2089   DrawableTextAntialias( const DrawableTextAntialias &original_ );
2090 
2091   /*virtual*/ ~DrawableTextAntialias ( void );
2092 
2093   // Operator to invoke equivalent draw API call
2094   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2095 
2096   // Return polymorphic copy of object
2097   /*virtual*/ DrawableBase* copy() const;
2098 
2099   void flag( bool flag_ )
2100     {
2101       _flag = flag_;
2102     }
2103   bool flag( void ) const
2104     {
2105       return _flag;
2106     }
2107 
2108 private:
2109   bool _flag;
2110 };
2111 
2112 // Decoration (text decoration)
2113 class MagickPPExport DrawableTextDecoration : public DrawableBase
2114 {
2115 public:
2116   DrawableTextDecoration ( DecorationType decoration_ );
2117 
2118   DrawableTextDecoration ( const DrawableTextDecoration& original_ );
2119 
2120   /*virtual*/ ~DrawableTextDecoration( void );
2121 
2122   // Operator to invoke equivalent draw API call
2123   /*virtual*/  void operator()( MagickCore::DrawingWand *context_ ) const;
2124 
2125   // Return polymorphic copy of object
2126   /*virtual*/ DrawableBase* copy() const;
2127 
2128   void decoration( DecorationType decoration_ )
2129     {
2130       _decoration = decoration_;
2131     }
2132   DecorationType decoration( void ) const
2133     {
2134       return _decoration;
2135     }
2136 
2137 private:
2138   DecorationType _decoration;
2139 };
2140 
2141   // Render text right-to-left or left-to-right.
2142   class MagickPPExport DrawableTextDirection : public DrawableBase
2143   {
2144   public:
2145 
2146     DrawableTextDirection(DirectionType direction_);
2147 
2148     ~DrawableTextDirection(void);
2149 
2150     void operator()(MagickCore::DrawingWand *context_) const;
2151 
2152     void direction(DirectionType direction_);
2153     DirectionType direction(void) const;
2154 
2155     DrawableBase* copy() const;
2156 
2157   private:
2158     DirectionType _direction;
2159   };
2160 
2161   // Specify text inter-line spacing
2162   class MagickPPExport DrawableTextInterlineSpacing : public DrawableBase
2163   {
2164   public:
2165 
2166     DrawableTextInterlineSpacing(double spacing_);
2167 
2168     ~DrawableTextInterlineSpacing(void);
2169 
2170     void operator()(MagickCore::DrawingWand *context_) const;
2171 
2172     void spacing(double spacing_);
2173     double spacing(void) const;
2174 
2175     DrawableBase* copy() const;
2176 
2177   private:
2178     double _spacing;
2179   };
2180 
2181   // Specify text inter-word spacing
2182   class MagickPPExport DrawableTextInterwordSpacing : public DrawableBase
2183   {
2184   public:
2185 
2186     DrawableTextInterwordSpacing(double spacing_);
2187 
2188     ~DrawableTextInterwordSpacing(void);
2189 
2190     void operator()(MagickCore::DrawingWand *context_) const;
2191 
2192     void spacing(double spacing_);
2193     double spacing(void) const;
2194 
2195     DrawableBase *copy() const;
2196 
2197   private:
2198     double _spacing;
2199   };
2200 
2201   // Specify text kerning
2202   class MagickPPExport DrawableTextKerning : public DrawableBase
2203   {
2204   public:
2205 
2206     DrawableTextKerning(double kerning_);
2207 
2208     ~DrawableTextKerning(void);
2209 
2210     void operator()(MagickCore::DrawingWand *context_) const;
2211 
2212     void kerning(double kerning_);
2213     double kerning(void) const;
2214 
2215     DrawableBase *copy() const;
2216 
2217   private:
2218     double _kerning;
2219   };
2220 
2221 // Text undercolor box
2222 class MagickPPExport DrawableTextUnderColor : public DrawableBase
2223 {
2224 public:
2225   DrawableTextUnderColor ( const Color &color_ );
2226 
2227   DrawableTextUnderColor ( const DrawableTextUnderColor& original_ );
2228 
2229   /*virtual*/ ~DrawableTextUnderColor ( void );
2230 
2231   // Operator to invoke equivalent draw API call
2232   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2233 
2234   // Return polymorphic copy of object
2235   /*virtual*/ DrawableBase* copy() const;
2236 
2237   void color( const Color& color_ )
2238     {
2239       _color = color_;
2240     }
2241   Color color( void ) const
2242     {
2243       return _color;
2244     }
2245 
2246 private:
2247   Color _color;
2248 };
2249 
2250 // Apply Translation
2251 class MagickPPExport DrawableTranslation : public DrawableBase
2252 {
2253 public:
2254   DrawableTranslation ( double x_, double y_ )
2255     : _x(x_),
2256       _y(y_)
2257     { }
2258 
2259   /*virtual*/ ~DrawableTranslation ( void );
2260 
2261   // Operator to invoke equivalent draw API call
2262   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2263 
2264   // Return polymorphic copy of object
2265   /*virtual*/ DrawableBase* copy() const;
2266 
2267   void x( double x_ )
2268     {
2269       _x = x_;
2270     }
2271   double x( void ) const
2272     {
2273       return _x;
2274     }
2275 
2276   void y( double y_ )
2277     {
2278       _y = y_;
2279     }
2280   double y( void ) const
2281     {
2282       return _y;
2283     }
2284 
2285 private:
2286   double _x;
2287   double _y;
2288 };
2289 
2290 // Set the size of the viewbox
2291 class MagickPPExport DrawableViewbox : public DrawableBase
2292 {
2293 public:
2294   DrawableViewbox(::ssize_t x1_, ::ssize_t y1_,
2295                   ::ssize_t x2_, ::ssize_t y2_)
2296     : _x1(x1_),
2297       _y1(y1_),
2298       _x2(x2_),
2299       _y2(y2_) { }
2300 
2301   /*virtual*/ ~DrawableViewbox ( void );
2302 
2303   // Operator to invoke equivalent draw API call
2304   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2305 
2306   // Return polymorphic copy of object
2307   /*virtual*/
2308   DrawableBase* copy() const;
2309 
2310   void x1( ::ssize_t x1_ )
2311     {
2312       _x1 = x1_;
2313     }
2314   ::ssize_t x1( void ) const
2315     {
2316       return _x1;
2317     }
2318 
2319   void y1( ::ssize_t y1_ )
2320     {
2321       _y1 = y1_;
2322     }
2323   ::ssize_t y1( void ) const
2324     {
2325       return _y1;
2326     }
2327 
2328   void x2( ::ssize_t x2_ )
2329     {
2330       _x2 = x2_;
2331     }
2332   ::ssize_t x2( void ) const
2333     {
2334       return _x2;
2335     }
2336 
2337   void y2( ::ssize_t y2_ )
2338     {
2339       _y2 = y2_;
2340     }
2341   ::ssize_t y2( void ) const
2342     {
2343       return _y2;
2344     }
2345 
2346 private:
2347   ::ssize_t _x1;
2348   ::ssize_t _y1;
2349   ::ssize_t _x2;
2350   ::ssize_t _y2;
2351 };
2352 
2353 //
2354 // Path Element Classes To Support DrawablePath
2355 //
2356 class MagickPPExport PathArcArgs
2357 {
2358 public:
2359   PathArcArgs( void );
2360 
2361   PathArcArgs( double radiusX_, double radiusY_,
2362                double xAxisRotation_, bool largeArcFlag_,
2363                bool sweepFlag_, double x_, double y_ );
2364 
2365   PathArcArgs( const PathArcArgs &original_ );
2366 
2367   ~PathArcArgs ( void );
2368 
2369   void radiusX( double radiusX_ )
2370     {
2371       _radiusX = radiusX_;
2372     }
2373   double radiusX( void ) const
2374     {
2375       return _radiusX;
2376     }
2377 
2378   void radiusY( double radiusY_ )
2379     {
2380       _radiusY = radiusY_;
2381     }
2382   double radiusY( void ) const
2383     {
2384       return _radiusY;
2385     }
2386 
2387   void xAxisRotation( double xAxisRotation_ )
2388     {
2389       _xAxisRotation = xAxisRotation_;
2390     }
2391   double xAxisRotation( void ) const
2392     {
2393       return _xAxisRotation;
2394     }
2395 
2396   void largeArcFlag( bool largeArcFlag_ )
2397     {
2398       _largeArcFlag = largeArcFlag_;
2399     }
2400   bool largeArcFlag( void ) const
2401     {
2402       return _largeArcFlag;
2403     }
2404 
2405   void sweepFlag( bool sweepFlag_ )
2406     {
2407       _sweepFlag = sweepFlag_;
2408     }
2409   bool sweepFlag( void ) const
2410     {
2411       return _sweepFlag;
2412     }
2413 
2414   void x( double x_ )
2415     {
2416       _x = x_;
2417     }
2418   double x( void ) const
2419     {
2420       return _x;
2421     }
2422 
2423   void y( double y_ )
2424     {
2425       _y = y_;
2426     }
2427   double y( void ) const
2428     {
2429       return _y;
2430     }
2431 
2432 private:
2433   double    _radiusX;   // X radius
2434   double    _radiusY;   // Y radius
2435   double    _xAxisRotation; // Rotation relative to X axis
2436   bool        _largeArcFlag;    // Draw longer of the two matching arcs
2437   bool        _sweepFlag;   // Draw arc matching clock-wise rotation
2438   double    _x;     // End-point X
2439   double    _y;     // End-point Y
2440 };
2441 
2442 // Compare two PathArcArgs objects regardless of LHS/RHS
2443 extern MagickPPExport int operator == ( const PathArcArgs& left_,
2444                                       const PathArcArgs& right_ );
2445 extern MagickPPExport int operator != ( const PathArcArgs& left_,
2446                                       const PathArcArgs& right_ );
2447 extern MagickPPExport int operator >  ( const PathArcArgs& left_,
2448                                       const PathArcArgs& right_ );
2449 extern MagickPPExport int operator <  ( const PathArcArgs& left_,
2450                                       const PathArcArgs& right_ );
2451 extern MagickPPExport int operator >= ( const PathArcArgs& left_,
2452                                       const PathArcArgs& right_ );
2453 extern MagickPPExport int operator <= ( const PathArcArgs& left_,
2454                                       const PathArcArgs& right_ );
2455 
2456 typedef std::vector<Magick::PathArcArgs> PathArcArgsList;
2457 
2458 #if defined(MagickDLLExplicitTemplate)
2459 
2460 MagickDrawableExtern template class MagickPPExport
2461 std::allocator<Magick::PathArcArgs>;
2462 
2463 // MagickDrawableExtern template class MagickPPExport
2464 // std::vector<Magick::PathArcArgs, std::allocator<Magick::PathArcArgs> >;
2465 
2466 #endif // MagickDLLExplicitTemplate
2467 
2468 // Path Arc (Elliptical Arc)
2469 class MagickPPExport PathArcAbs : public VPathBase
2470 {
2471 public:
2472   // Draw a single arc segment
2473   PathArcAbs ( const PathArcArgs &coordinates_ );
2474 
2475   // Draw multiple arc segments
2476   PathArcAbs ( const PathArcArgsList &coordinates_ );
2477 
2478   // Copy constructor
2479   PathArcAbs ( const PathArcAbs& original_ );
2480 
2481   // Destructor
2482   /*virtual*/ ~PathArcAbs ( void );
2483 
2484   // Operator to invoke equivalent draw API call
2485   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2486 
2487   // Return polymorphic copy of object
2488   /*virtual*/ VPathBase* copy() const;
2489 
2490 private:
2491   PathArcArgsList _coordinates;
2492 };
2493 class MagickPPExport PathArcRel : public VPathBase
2494 {
2495 public:
2496   // Draw a single arc segment
2497   PathArcRel ( const PathArcArgs &coordinates_ );
2498 
2499   // Draw multiple arc segments
2500   PathArcRel ( const PathArcArgsList &coordinates_ );
2501 
2502   PathArcRel ( const PathArcRel& original_ );
2503 
2504   /*virtual*/ ~PathArcRel ( void );
2505 
2506   // Operator to invoke equivalent draw API call
2507   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2508 
2509   // Return polymorphic copy of object
2510   /*virtual*/ VPathBase* copy() const;
2511 
2512 private:
2513   PathArcArgsList _coordinates;
2514 };
2515 
2516 // Path Closepath
2517 class MagickPPExport PathClosePath : public VPathBase
2518 {
2519 public:
2520   PathClosePath ( void )
2521     : _dummy(0)
2522     {
2523     }
2524 
2525   /*virtual*/ ~PathClosePath ( void );
2526 
2527   // Operator to invoke equivalent draw API call
2528   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2529 
2530   // Return polymorphic copy of object
2531   /*virtual*/ VPathBase* copy() const;
2532 
2533 private:
2534   ::ssize_t   _dummy;
2535 };
2536 
2537 //
2538 // Curveto (Cubic Bezier)
2539 //
2540 class MagickPPExport PathCurvetoArgs
2541 {
2542 public:
2543   PathCurvetoArgs( void );
2544 
2545   PathCurvetoArgs( double x1_, double y1_,
2546                    double x2_, double y2_,
2547                    double x_, double y_ );
2548 
2549   PathCurvetoArgs( const PathCurvetoArgs &original_ );
2550 
2551   ~PathCurvetoArgs ( void );
2552 
2553   void x1( double x1_ )
2554     {
2555       _x1 = x1_;
2556     }
2557 double x1( void ) const
2558 {
2559   return _x1;
2560 }
2561 
2562 void y1( double y1_ )
2563 {
2564   _y1 = y1_;
2565 }
2566 double y1( void ) const
2567 {
2568   return _y1;
2569 }
2570 
2571 void x2( double x2_ )
2572 {
2573   _x2 = x2_;
2574 }
2575 double x2( void ) const
2576 {
2577   return _x2;
2578 }
2579 
2580 void y2( double y2_ )
2581 {
2582   _y2 = y2_;
2583 }
2584 double y2( void ) const
2585 {
2586   return _y2;
2587 }
2588 
2589 void x( double x_ )
2590 {
2591   _x = x_;
2592 }
2593 double x( void ) const
2594 {
2595   return _x;
2596 }
2597 
2598 void y( double y_ )
2599 {
2600   _y = y_;
2601 }
2602 double y( void ) const
2603 {
2604   return _y;
2605 }
2606 
2607 private:
2608 double _x1;
2609 double _y1;
2610 double _x2;
2611 double _y2;
2612 double _x;
2613 double _y;
2614 };
2615 
2616 // Compare two PathCurvetoArgs objects regardless of LHS/RHS
2617 extern MagickPPExport int operator == ( const PathCurvetoArgs& left_,
2618                                       const PathCurvetoArgs& right_ );
2619 extern MagickPPExport int operator != ( const PathCurvetoArgs& left_,
2620                                       const PathCurvetoArgs& right_ );
2621 extern MagickPPExport int operator >  ( const PathCurvetoArgs& left_,
2622                                       const PathCurvetoArgs& right_ );
2623 extern MagickPPExport int operator <  ( const PathCurvetoArgs& left_,
2624                                       const PathCurvetoArgs& right_ );
2625 extern MagickPPExport int operator >= ( const PathCurvetoArgs& left_,
2626                                       const PathCurvetoArgs& right_ );
2627 extern MagickPPExport int operator <= ( const PathCurvetoArgs& left_,
2628                                       const PathCurvetoArgs& right_ );
2629 
2630 typedef std::vector<Magick::PathCurvetoArgs> PathCurveToArgsList;
2631 
2632 #if defined(MagickDLLExplicitTemplate)
2633 
2634 MagickDrawableExtern template class MagickPPExport
2635 std::allocator<Magick::PathCurvetoArgs>;
2636 
2637 // MagickDrawableExtern template class MagickPPExport
2638 // std::vector<Magick::PathCurvetoArgs, std::allocator<Magick::PathCurvetoArgs> >;
2639 
2640 #endif // MagickDLLExplicitTemplate
2641 
2642 class MagickPPExport PathCurvetoAbs : public VPathBase
2643 {
2644 public:
2645   // Draw a single curve
2646   PathCurvetoAbs ( const PathCurvetoArgs &args_ );
2647 
2648   // Draw multiple curves
2649   PathCurvetoAbs ( const PathCurveToArgsList &args_ );
2650 
2651   // Copy constructor
2652   PathCurvetoAbs ( const PathCurvetoAbs& original_ );
2653 
2654   // Destructor
2655   /*virtual*/ ~PathCurvetoAbs ( void );
2656 
2657   // Operator to invoke equivalent draw API call
2658   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2659 
2660   // Return polymorphic copy of object
2661   /*virtual*/ VPathBase* copy() const;
2662 
2663 private:
2664   PathCurveToArgsList _args;
2665 };
2666 class MagickPPExport PathCurvetoRel : public VPathBase
2667 {
2668 public:
2669   // Draw a single curve
2670   PathCurvetoRel ( const PathCurvetoArgs &args_ );
2671 
2672   // Draw multiple curves
2673   PathCurvetoRel ( const PathCurveToArgsList &args_ );
2674 
2675   // Copy constructor
2676   PathCurvetoRel ( const PathCurvetoRel& original_ );
2677 
2678   /*virtual*/ ~PathCurvetoRel ( void );
2679 
2680   // Operator to invoke equivalent draw API call
2681   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2682 
2683   // Return polymorphic copy of object
2684   /*virtual*/ VPathBase* copy() const;
2685 
2686 private:
2687   PathCurveToArgsList _args;
2688 };
2689 class MagickPPExport PathSmoothCurvetoAbs : public VPathBase
2690 {
2691 public:
2692   // Draw a single curve
2693   PathSmoothCurvetoAbs ( const Magick::Coordinate &coordinates_ );
2694 
2695   // Draw multiple curves
2696   PathSmoothCurvetoAbs ( const CoordinateList &coordinates_ );
2697 
2698   // Copy constructor
2699   PathSmoothCurvetoAbs ( const PathSmoothCurvetoAbs& original_ );
2700 
2701   /*virtual*/ ~PathSmoothCurvetoAbs ( void );
2702 
2703   // Operator to invoke equivalent draw API call
2704   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2705 
2706   // Return polymorphic copy of object
2707   /*virtual*/
2708   VPathBase* copy() const;
2709 
2710 private:
2711   CoordinateList _coordinates;
2712 };
2713 class MagickPPExport PathSmoothCurvetoRel : public VPathBase
2714 {
2715 public:
2716   // Draw a single curve
2717   PathSmoothCurvetoRel ( const Coordinate &coordinates_ );
2718 
2719   // Draw multiple curves
2720   PathSmoothCurvetoRel ( const CoordinateList &coordinates_ );
2721 
2722   // Copy constructor
2723   PathSmoothCurvetoRel ( const PathSmoothCurvetoRel& original_ );
2724 
2725   // Destructor
2726   /*virtual*/ ~PathSmoothCurvetoRel ( void );
2727 
2728   // Operator to invoke equivalent draw API call
2729   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2730 
2731   // Return polymorphic copy of object
2732   /*virtual*/
2733   VPathBase* copy() const;
2734 
2735 private:
2736   CoordinateList _coordinates;
2737 };
2738 
2739 //
2740 // Quadratic Curveto (Quadratic Bezier)
2741 //
2742 class MagickPPExport PathQuadraticCurvetoArgs
2743 {
2744 public:
2745   PathQuadraticCurvetoArgs( void );
2746 
2747   PathQuadraticCurvetoArgs( double x1_, double y1_,
2748                             double x_, double y_ );
2749 
2750   PathQuadraticCurvetoArgs( const PathQuadraticCurvetoArgs &original_ );
2751 
2752   ~PathQuadraticCurvetoArgs ( void );
2753 
2754   void x1( double x1_ )
2755     {
2756       _x1 = x1_;
2757     }
2758   double x1( void ) const
2759     {
2760       return _x1;
2761     }
2762 
2763   void y1( double y1_ )
2764     {
2765       _y1 = y1_;
2766     }
2767   double y1( void ) const
2768     {
2769       return _y1;
2770     }
2771 
2772   void x( double x_ )
2773     {
2774       _x = x_;
2775     }
2776   double x( void ) const
2777     {
2778       return _x;
2779     }
2780 
2781   void y( double y_ )
2782     {
2783       _y = y_;
2784     }
2785   double y( void ) const
2786     {
2787       return _y;
2788     }
2789 
2790 private:
2791   double _x1;
2792   double _y1;
2793   double _x;
2794   double _y;
2795 };
2796 
2797 // Compare two PathQuadraticCurvetoArgs objects regardless of LHS/RHS
2798 extern MagickPPExport int operator == ( const PathQuadraticCurvetoArgs& left_,
2799                                       const PathQuadraticCurvetoArgs& right_ );
2800 extern MagickPPExport int operator != ( const PathQuadraticCurvetoArgs& left_,
2801                                       const PathQuadraticCurvetoArgs& right_);
2802 extern MagickPPExport int operator >  ( const PathQuadraticCurvetoArgs& left_,
2803                                       const PathQuadraticCurvetoArgs& right_);
2804 extern MagickPPExport int operator <  ( const PathQuadraticCurvetoArgs& left_,
2805                                       const PathQuadraticCurvetoArgs& right_);
2806 extern MagickPPExport int operator >= ( const PathQuadraticCurvetoArgs& left_,
2807                                       const PathQuadraticCurvetoArgs& right_ );
2808 extern MagickPPExport int operator <= ( const PathQuadraticCurvetoArgs& left_,
2809                                       const PathQuadraticCurvetoArgs& right_ );
2810 
2811 typedef std::vector<Magick::PathQuadraticCurvetoArgs> PathQuadraticCurvetoArgsList;
2812 
2813 #if defined(MagickDLLExplicitTemplate)
2814 
2815 MagickDrawableExtern template class MagickPPExport
2816 std::allocator<Magick::PathQuadraticCurvetoArgs>;
2817 
2818 // MagickDrawableExtern template class MagickPPExport
2819 // std::vector<Magick::PathQuadraticCurvetoArgs, std::allocator<Magick::PathQuadraticCurvetoArgs> >;
2820 
2821 #endif // MagickDLLExplicitTemplate
2822 
2823 class MagickPPExport PathQuadraticCurvetoAbs : public VPathBase
2824 {
2825 public:
2826   // Draw a single curve
2827   PathQuadraticCurvetoAbs ( const Magick::PathQuadraticCurvetoArgs &args_ );
2828 
2829   // Draw multiple curves
2830   PathQuadraticCurvetoAbs ( const PathQuadraticCurvetoArgsList &args_ );
2831 
2832   // Copy constructor
2833   PathQuadraticCurvetoAbs ( const PathQuadraticCurvetoAbs& original_ );
2834 
2835   // Destructor
2836   /*virtual*/ ~PathQuadraticCurvetoAbs ( void );
2837 
2838   // Operator to invoke equivalent draw API call
2839   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2840 
2841   // Return polymorphic copy of object
2842   /*virtual*/ VPathBase* copy() const;
2843 
2844 private:
2845   PathQuadraticCurvetoArgsList _args;
2846 };
2847 class MagickPPExport PathQuadraticCurvetoRel : public VPathBase
2848 {
2849 public:
2850   // Draw a single curve
2851   PathQuadraticCurvetoRel ( const Magick::PathQuadraticCurvetoArgs &args_ );
2852 
2853   // Draw multiple curves
2854   PathQuadraticCurvetoRel ( const PathQuadraticCurvetoArgsList &args_ );
2855 
2856   // Copy constructor
2857   PathQuadraticCurvetoRel ( const PathQuadraticCurvetoRel& original_ );
2858 
2859   // Destructor
2860   /*virtual*/ ~PathQuadraticCurvetoRel ( void );
2861 
2862   // Operator to invoke equivalent draw API call
2863   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2864 
2865   // Return polymorphic copy of object
2866   /*virtual*/ VPathBase* copy() const;
2867 
2868 private:
2869   PathQuadraticCurvetoArgsList _args;
2870 };
2871 class MagickPPExport PathSmoothQuadraticCurvetoAbs : public VPathBase
2872 {
2873 public:
2874   // Draw a single curve
2875   PathSmoothQuadraticCurvetoAbs ( const Magick::Coordinate &coordinate_ );
2876 
2877   // Draw multiple curves
2878   PathSmoothQuadraticCurvetoAbs ( const CoordinateList &coordinates_ );
2879 
2880   // Copy constructor
2881   PathSmoothQuadraticCurvetoAbs ( const PathSmoothQuadraticCurvetoAbs& original_ );
2882 
2883   // Destructor
2884   /*virtual*/ ~PathSmoothQuadraticCurvetoAbs ( void );
2885 
2886   // Operator to invoke equivalent draw API call
2887   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2888 
2889   // Return polymorphic copy of object
2890   /*virtual*/ VPathBase* copy() const;
2891 
2892 private:
2893   CoordinateList _coordinates;
2894 };
2895 class MagickPPExport PathSmoothQuadraticCurvetoRel : public VPathBase
2896 {
2897 public:
2898   // Draw a single curve
2899   PathSmoothQuadraticCurvetoRel ( const Magick::Coordinate &coordinate_ );
2900 
2901   // Draw multiple curves
2902   PathSmoothQuadraticCurvetoRel ( const CoordinateList &coordinates_ );
2903 
2904   // Copy constructor
2905   PathSmoothQuadraticCurvetoRel ( const PathSmoothQuadraticCurvetoRel& original_ );
2906 
2907   // Destructor
2908   /*virtual*/ ~PathSmoothQuadraticCurvetoRel ( void );
2909 
2910   // Operator to invoke equivalent draw API call
2911   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2912 
2913   // Return polymorphic copy of object
2914   /*virtual*/ VPathBase* copy() const;
2915 
2916 private:
2917   CoordinateList _coordinates;
2918 };
2919 
2920 //
2921 // Path Lineto
2922 //
2923 class MagickPPExport PathLinetoAbs : public VPathBase
2924 {
2925 public:
2926   // Draw to a single point
2927   PathLinetoAbs ( const Magick::Coordinate& coordinate_  );
2928 
2929   // Draw to multiple points
2930   PathLinetoAbs ( const CoordinateList &coordinates_ );
2931 
2932   // Copy constructor
2933   PathLinetoAbs ( const PathLinetoAbs& original_ );
2934 
2935   // Destructor
2936   /*virtual*/ ~PathLinetoAbs ( void );
2937 
2938   // Operator to invoke equivalent draw API call
2939   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2940 
2941   // Return polymorphic copy of object
2942   /*virtual*/ VPathBase* copy() const;
2943 
2944 private:
2945   CoordinateList _coordinates;
2946 };
2947 class MagickPPExport PathLinetoRel : public VPathBase
2948 {
2949 public:
2950   // Draw to a single point
2951   PathLinetoRel ( const Magick::Coordinate& coordinate_ );
2952 
2953   // Draw to multiple points
2954   PathLinetoRel ( const CoordinateList &coordinates_ );
2955 
2956   // Copy constructor
2957   PathLinetoRel ( const PathLinetoRel& original_ );
2958 
2959   // Destructor
2960   /*virtual*/ ~PathLinetoRel ( void );
2961 
2962   // Operator to invoke equivalent draw API call
2963   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2964 
2965   // Return polymorphic copy of object
2966   /*virtual*/ VPathBase* copy() const;
2967 
2968 private:
2969   CoordinateList _coordinates;
2970 };
2971 
2972 // Path Horizontal Lineto
2973 class MagickPPExport PathLinetoHorizontalAbs : public VPathBase
2974 {
2975 public:
2976   PathLinetoHorizontalAbs ( double x_ )
2977     : _x(x_)
2978     {
2979     }
2980 
2981   /*virtual*/ ~PathLinetoHorizontalAbs ( void );
2982 
2983   // Operator to invoke equivalent draw API call
2984   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
2985 
2986   // Return polymorphic copy of object
2987   /*virtual*/ VPathBase* copy() const;
2988 
2989   void x( double x_ )
2990     {
2991       _x = x_;
2992     }
2993   double x( void ) const
2994     {
2995       return _x;
2996     }
2997 
2998 private:
2999   double _x;
3000 };
3001 class MagickPPExport PathLinetoHorizontalRel : public VPathBase
3002 {
3003 public:
3004   PathLinetoHorizontalRel ( double x_ )
3005     : _x(x_)
3006     {
3007     }
3008 
3009   /*virtual*/ ~PathLinetoHorizontalRel ( void );
3010 
3011   // Operator to invoke equivalent draw API call
3012   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3013 
3014   // Return polymorphic copy of object
3015   /*virtual*/ VPathBase* copy() const;
3016 
3017   void x( double x_ )
3018     {
3019       _x = x_;
3020     }
3021   double x( void ) const
3022     {
3023       return _x;
3024     }
3025 
3026 private:
3027   double _x;
3028 };
3029 
3030 // Path Vertical Lineto
3031 class MagickPPExport PathLinetoVerticalAbs : public VPathBase
3032 {
3033 public:
3034   PathLinetoVerticalAbs ( double y_ )
3035     : _y(y_)
3036     {
3037     }
3038 
3039   /*virtual*/ ~PathLinetoVerticalAbs ( void );
3040 
3041   // Operator to invoke equivalent draw API call
3042   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3043 
3044   // Return polymorphic copy of object
3045   /*virtual*/ VPathBase* copy() const;
3046 
3047   void y( double y_ )
3048     {
3049       _y = y_;
3050     }
3051   double y( void ) const
3052     {
3053       return _y;
3054     }
3055 
3056 private:
3057   double _y;
3058 };
3059 class MagickPPExport PathLinetoVerticalRel : public VPathBase
3060 {
3061 public:
3062   PathLinetoVerticalRel ( double y_ )
3063     : _y(y_)
3064     {
3065     }
3066 
3067   /*virtual*/ ~PathLinetoVerticalRel ( void );
3068 
3069   // Operator to invoke equivalent draw API call
3070   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3071 
3072   // Return polymorphic copy of object
3073   /*virtual*/ VPathBase* copy() const;
3074 
3075   void y( double y_ )
3076     {
3077       _y = y_;
3078     }
3079   double y( void ) const
3080     {
3081       return _y;
3082     }
3083 
3084 private:
3085   double _y;
3086 };
3087 
3088 // Path Moveto
3089 class MagickPPExport PathMovetoAbs : public VPathBase
3090 {
3091 public:
3092   // Simple moveto
3093   PathMovetoAbs ( const Magick::Coordinate &coordinate_ );
3094 
3095   // Moveto followed by implicit linetos
3096   PathMovetoAbs ( const CoordinateList &coordinates_ );
3097 
3098   // Copy constructor
3099   PathMovetoAbs ( const PathMovetoAbs& original_ );
3100 
3101   // Destructor
3102   /*virtual*/ ~PathMovetoAbs ( void );
3103 
3104   // Operator to invoke equivalent draw API call
3105   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3106 
3107   // Return polymorphic copy of object
3108   /*virtual*/ VPathBase* copy() const;
3109 
3110 private:
3111   CoordinateList _coordinates;
3112 };
3113 class MagickPPExport PathMovetoRel : public VPathBase
3114 {
3115 public:
3116   // Simple moveto
3117   PathMovetoRel ( const Magick::Coordinate &coordinate_ );
3118 
3119   // Moveto followed by implicit linetos
3120   PathMovetoRel ( const CoordinateList &coordinates_ );
3121 
3122   // Copy constructor
3123   PathMovetoRel ( const PathMovetoRel& original_ );
3124 
3125   // Destructor
3126   /*virtual*/ ~PathMovetoRel ( void );
3127 
3128   // Operator to invoke equivalent draw API call
3129   /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const;
3130 
3131   // Return polymorphic copy of object
3132   /*virtual*/ VPathBase* copy() const;
3133 
3134 private:
3135   CoordinateList _coordinates;
3136 };
3137 
3138 } // namespace Magick
3139 
3140 #endif // Magick_Drawable_header