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