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