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