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