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