]> granicus.if.org Git - imagemagick/blob - Magick++/lib/Drawable.cpp
Removed deprecated overloads.
[imagemagick] / Magick++ / lib / Drawable.cpp
1 // This may look like C code, but it is really -*- C++ -*-
2 //
3 // Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
4 // Copyright Dirk Lemstra 2014
5 //
6 // Implementation of Drawable (Graphic objects)
7 //
8
9 #define MAGICKCORE_IMPLEMENTATION  1
10 #define MAGICK_PLUSPLUS_IMPLEMENTATION 1
11 #define MAGICK_DRAWABLE_IMPLEMENTATION
12
13 #include "Magick++/Include.h"
14 #include <math.h>
15 #include <string>
16
17 #include "Magick++/Drawable.h"
18 #include "Magick++/Image.h"
19
20 using namespace std;
21
22 MagickPPExport int Magick::operator == ( const Magick::Coordinate& left_,
23                                         const Magick::Coordinate& right_ )
24 {
25   return ( ( left_.x() == right_.x() ) && ( left_.y() == right_.y() ) );
26 }
27 MagickPPExport int Magick::operator != ( const Magick::Coordinate& left_,
28                                         const Magick::Coordinate& right_ )
29 {
30   return ( ! (left_ == right_) );
31 }
32 MagickPPExport int Magick::operator >  ( const Magick::Coordinate& left_,
33                                         const Magick::Coordinate& right_ )
34 {
35   return ( !( left_ < right_ ) && ( left_ != right_ ) );
36 }
37 MagickPPExport int Magick::operator <  ( const Magick::Coordinate& left_,
38                                         const Magick::Coordinate& right_ )
39 {
40   // Based on distance from origin
41   return  ( (sqrt(left_.x()*left_.x() + left_.y()*left_.y())) <
42             (sqrt(right_.x()*right_.x() + right_.y()*right_.y())) );
43 }
44 MagickPPExport int Magick::operator >= ( const Magick::Coordinate& left_,
45                                         const Magick::Coordinate& right_ )
46 {
47   return ( ( left_ > right_ ) || ( left_ == right_ ) );
48 }
49 MagickPPExport int Magick::operator <= ( const Magick::Coordinate& left_,
50                                         const Magick::Coordinate& right_ )
51 {
52   return ( ( left_ < right_ ) || ( left_ == right_ ) );
53 }
54
55 /*virtual*/
56 Magick::DrawableBase::~DrawableBase ( void )
57 {
58 }
59
60 // Constructor
61 Magick::Drawable::Drawable ( void )
62   : dp(0)
63 {
64 }
65
66 // Construct from DrawableBase
67 Magick::Drawable::Drawable ( const Magick::DrawableBase& original_ )
68   : dp(original_.copy())
69 {
70 }
71
72 // Destructor
73 Magick::Drawable::~Drawable ( void )
74 {
75   delete dp;
76   dp = 0;
77 }
78
79 // Copy constructor
80 Magick::Drawable::Drawable ( const Magick::Drawable& original_ )
81   : dp(original_.dp? original_.dp->copy(): 0)
82 {
83 }
84
85 // Assignment operator
86 Magick::Drawable& Magick::Drawable::operator= (const Magick::Drawable& original_ )
87 {
88   if (this != &original_)
89     {
90       DrawableBase* temp_dp = (original_.dp ? original_.dp->copy() : 0);
91       delete dp;
92       dp = temp_dp;
93     }
94   return *this;
95 }
96
97 // Operator to invoke contained object
98 void Magick::Drawable::operator()( MagickCore::DrawingWand * context_ ) const
99 {
100   if(dp)
101     dp->operator()( context_ );
102 }
103
104 MagickPPExport int Magick::operator == ( const Magick::Drawable& /*left_*/,
105                                         const Magick::Drawable& /*right_*/ )
106 {
107   return ( 1 );
108 }
109 MagickPPExport int Magick::operator != ( const Magick::Drawable& /*left_*/,
110                                         const Magick::Drawable& /*right_*/ )
111 {
112   return ( 0 );
113 }
114 MagickPPExport int Magick::operator > ( const Magick::Drawable& /*left_*/,
115                                        const Magick::Drawable& /*right_*/ )
116 {
117   return ( 0 );
118 }
119 MagickPPExport int Magick::operator <  ( const Magick::Drawable& /*left_*/,
120                                         const Magick::Drawable& /*right_*/ )
121 {
122   return  ( 0 );
123 }
124 MagickPPExport int Magick::operator >= ( const Magick::Drawable& left_,
125                                         const Magick::Drawable& right_ )
126 {
127   return ( ( left_ > right_ ) || ( left_ == right_ ) );
128 }
129 MagickPPExport int Magick::operator <= ( const Magick::Drawable& left_,
130                                         const Magick::Drawable& right_ )
131 {
132   return ( ( left_ < right_ ) || ( left_ == right_ ) );
133 }
134
135 /*virtual*/
136 Magick::VPathBase::~VPathBase ( void )
137 {
138 }
139
140 // Constructor
141 Magick::VPath::VPath ( void )
142   : dp(0)
143 {
144 }
145
146 // Construct from VPathBase
147 Magick::VPath::VPath ( const Magick::VPathBase& original_ )
148   : dp(original_.copy())
149 {
150 }
151
152 // Destructor
153 /* virtual */ Magick::VPath::~VPath ( void )
154 {
155   delete dp;
156   dp = 0;
157 }
158
159 // Copy constructor
160 Magick::VPath::VPath ( const Magick::VPath& original_ )
161   : dp(original_.dp? original_.dp->copy(): 0)
162 {
163 }
164
165 // Assignment operator
166 Magick::VPath& Magick::VPath::operator= (const Magick::VPath& original_ )
167 {
168   if (this != &original_)
169     {
170       VPathBase* temp_dp = (original_.dp ? original_.dp->copy() : 0);
171       delete dp;
172       dp = temp_dp;
173     }
174   return *this;
175 }
176
177 // Operator to invoke contained object
178 void Magick::VPath::operator()( MagickCore::DrawingWand * context_ ) const
179 {
180   if(dp)
181     dp->operator()( context_ );
182 }
183
184 MagickPPExport int Magick::operator == ( const Magick::VPath& /*left_*/,
185                                         const Magick::VPath& /*right_*/ )
186 {
187   return ( 1 );
188 }
189 MagickPPExport int Magick::operator != ( const Magick::VPath& /*left_*/,
190                                         const Magick::VPath& /*right_*/ )
191 {
192   return ( 0 );
193 }
194 MagickPPExport int Magick::operator > ( const Magick::VPath& /*left_*/,
195                                        const Magick::VPath& /*right_*/ )
196 {
197   return ( 0 );
198 }
199 MagickPPExport int Magick::operator <  ( const Magick::VPath& /*left_*/,
200                                         const Magick::VPath& /*right_*/ )
201 {
202   return  ( 0 );
203 }
204 MagickPPExport int Magick::operator >= ( const Magick::VPath& left_,
205                                         const Magick::VPath& right_ )
206 {
207   return ( ( left_ > right_ ) || ( left_ == right_ ) );
208 }
209 MagickPPExport int Magick::operator <= ( const Magick::VPath& left_,
210                                         const Magick::VPath& right_ )
211 {
212   return ( ( left_ < right_ ) || ( left_ == right_ ) );
213 }
214
215 //
216 // Drawable Objects
217 //
218
219 // Affine (scaling, rotation, and translation)
220 Magick::DrawableAffine::DrawableAffine( double sx_, double sy_,
221                                         double rx_, double ry_,
222                                         double tx_, double ty_ )
223 {
224   _affine.sx = sx_;
225   _affine.rx = rx_;
226   _affine.ry = ry_;
227   _affine.sy = sy_;
228   _affine.tx = tx_;
229   _affine.ty = ty_;
230 }
231 Magick::DrawableAffine::DrawableAffine( void )
232 {
233   GetAffineMatrix(&_affine);
234 }
235 Magick::DrawableAffine::~DrawableAffine( void )
236 {
237 }
238 void Magick::DrawableAffine::operator()( MagickCore::DrawingWand * context_ ) const
239 {
240   DrawAffine( context_, &_affine );
241 }
242 Magick::DrawableBase* Magick::DrawableAffine::copy() const
243 {
244   return new DrawableAffine(*this);
245 }
246
247 // Change pixel matte value to transparent using PaintMethod
248 Magick::DrawableAlpha::~DrawableAlpha(void)
249 {
250 }
251
252 void Magick::DrawableAlpha::operator()(MagickCore::DrawingWand * context_) const
253 {
254   DrawAlpha(context_,_x,_y,_paintMethod);
255 }
256
257 Magick::DrawableBase* Magick::DrawableAlpha::copy() const
258 {
259   return new DrawableAlpha(*this);
260 }
261
262 // Arc
263 Magick::DrawableArc::~DrawableArc( void )
264 {
265 }
266 void Magick::DrawableArc::operator()( MagickCore::DrawingWand * context_ ) const
267 {
268   DrawArc( context_, _startX, _startY, _endX, _endY, _startDegrees, _endDegrees );
269 }
270 Magick::DrawableBase* Magick::DrawableArc::copy() const
271 {
272   return new DrawableArc(*this);
273 }
274
275 //
276 // Bezier curve
277 //
278 // Construct from coordinates (Coordinate list must contain at least three members)
279 Magick::DrawableBezier::DrawableBezier ( const CoordinateList &coordinates_ )
280   : _coordinates(coordinates_)
281 {
282 }
283 // Copy constructor
284 Magick::DrawableBezier::DrawableBezier( const Magick::DrawableBezier& original_ )
285   : DrawableBase (original_),
286     _coordinates(original_._coordinates)
287 {
288 }
289 // Destructor
290 Magick::DrawableBezier::~DrawableBezier( void )
291 {
292 }
293 void Magick::DrawableBezier::operator()( MagickCore::DrawingWand * context_ ) const
294 {
295   size_t num_coords = (size_t) _coordinates.size();
296   PointInfo *coordinates = new PointInfo[num_coords];
297
298   PointInfo *q = coordinates;
299   CoordinateList::const_iterator p = _coordinates.begin();
300
301   while( p != _coordinates.end() )
302     {
303       q->x = p->x();
304       q->y = p->y();
305       q++;
306       p++;
307     }
308
309   DrawBezier( context_, num_coords, coordinates );
310   delete [] coordinates;
311 }
312 Magick::DrawableBase* Magick::DrawableBezier::copy() const
313 {
314   return new DrawableBezier(*this);
315 }
316
317 //
318 //Clip Path 
319 //
320
321 // Pop (terminate) Clip path definition
322 Magick::DrawablePopClipPath::~DrawablePopClipPath ( void )
323 {
324 }
325 void Magick::DrawablePopClipPath::operator() ( MagickCore::DrawingWand * context_ ) const
326 {
327   DrawPopClipPath( context_ );
328   DrawPopDefs(context_);
329 }
330 Magick::DrawableBase* Magick::DrawablePopClipPath::copy() const
331 {
332   return new DrawablePopClipPath(*this);
333 }
334
335 // Push clip path definition
336 Magick::DrawablePushClipPath::DrawablePushClipPath( const std::string &id_)
337   : _id(id_.c_str())    //multithread safe const char*
338 {
339 }
340 Magick::DrawablePushClipPath::DrawablePushClipPath
341 ( const Magick::DrawablePushClipPath& original_ ) //multithread safe const char*
342   : DrawableBase (original_),
343     _id(original_._id.c_str())
344 {
345 }
346 Magick::DrawablePushClipPath::~DrawablePushClipPath( void )
347 {
348 }
349 void Magick::DrawablePushClipPath::operator()
350   ( MagickCore::DrawingWand * context_ ) const
351 {
352   DrawPushDefs(context_);
353   DrawPushClipPath( context_, _id.c_str());
354 }
355 Magick::DrawableBase* Magick::DrawablePushClipPath::copy() const
356 {
357   return new DrawablePushClipPath(*this);
358 }
359 //
360 // ClipPath
361 //
362 Magick::DrawableClipPath::DrawableClipPath( const std::string &id_ )
363 :_id(id_.c_str())
364 {
365 }
366
367 Magick::DrawableClipPath::DrawableClipPath ( const Magick::DrawableClipPath& original_ )
368   : DrawableBase (original_),
369     _id(original_._id.c_str())
370 {
371 }
372 Magick::DrawableClipPath::~DrawableClipPath( void )
373 {
374 }
375 void Magick::DrawableClipPath::operator()( MagickCore::DrawingWand * context_ ) const
376 {
377         (void) DrawSetClipPath( context_, _id.c_str());
378 }
379 Magick::DrawableBase* Magick::DrawableClipPath::copy() const
380 {
381   return new DrawableClipPath(*this);
382 }
383
384 // Circle
385 Magick::DrawableCircle::~DrawableCircle ( void )
386 {
387 }
388 void Magick::DrawableCircle::operator()( MagickCore::DrawingWand * context_ ) const
389 {
390   DrawCircle( context_, _originX, _originY, _perimX, _perimY );
391 }
392 Magick::DrawableBase* Magick::DrawableCircle::copy() const
393 {
394   return new DrawableCircle(*this);
395 }
396
397 // Colorize at point using PaintMethod
398 Magick::DrawableColor::~DrawableColor( void )
399 {
400 }
401 void Magick::DrawableColor::operator()( MagickCore::DrawingWand * context_ ) const
402 {
403   DrawColor( context_, _x, _y, _paintMethod );
404 }
405 Magick::DrawableBase* Magick::DrawableColor::copy() const
406 {
407   return new DrawableColor(*this);
408 }
409
410 // Draw image at point
411 Magick::DrawableCompositeImage::DrawableCompositeImage
412 ( double x_, double y_,
413   double width_, double height_,
414   const std::string &filename_,
415   Magick::CompositeOperator composition_ )
416   : _composition(composition_),
417     _x(x_),
418     _y(y_),
419     _width(width_),
420     _height(height_),
421     _image(new Image(filename_))
422 {
423 }
424 Magick::DrawableCompositeImage::DrawableCompositeImage
425 ( double x_, double y_,
426   double width_, double height_,
427   const Magick::Image &image_,
428   Magick::CompositeOperator composition_ )
429   : _composition(composition_),
430     _x(x_),
431     _y(y_),
432     _width(width_),
433     _height(height_),
434     _image(new Image(image_))
435 {
436 }
437 Magick::DrawableCompositeImage::DrawableCompositeImage
438 ( double x_, double y_,
439   double width_, double height_,
440   const std::string &filename_ )
441   :_composition(CopyCompositeOp),
442    _x(x_),
443    _y(y_),
444    _width(width_),
445    _height(height_),
446    _image(new Image(filename_))
447 {
448 }
449 Magick::DrawableCompositeImage::DrawableCompositeImage
450 ( double x_, double y_,
451   double width_, double height_,
452   const Magick::Image &image_ )
453   :_composition(CopyCompositeOp),
454    _x(x_),
455    _y(y_),
456    _width(width_),
457    _height(height_),
458    _image(new Image(image_))
459 {
460 }
461 Magick::DrawableCompositeImage::DrawableCompositeImage
462 ( double x_, double y_,
463   const std::string &filename_ )
464   : _composition(CopyCompositeOp),
465     _x(x_),
466     _y(y_),
467     _width(0),
468     _height(0),
469     _image(new Image(filename_))
470 {
471   _width=_image->columns();
472   _height=_image->rows();
473 }
474 Magick::DrawableCompositeImage::DrawableCompositeImage
475 ( double x_, double y_,
476   const Magick::Image &image_ )
477   : _composition(CopyCompositeOp),
478     _x(x_),
479     _y(y_),
480     _width(0),
481     _height(0),
482     _image(new Image(image_))
483 {
484   _width=_image->columns();
485   _height=_image->rows();
486 }
487 // Copy constructor
488 Magick::DrawableCompositeImage::DrawableCompositeImage
489 ( const Magick::DrawableCompositeImage& original_ )
490   :  Magick::DrawableBase(original_),
491      _composition(original_._composition),
492      _x(original_._x),
493      _y(original_._y),
494      _width(original_._width),
495      _height(original_._height),
496      _image(new Image(*original_._image))
497 {
498 }
499 Magick::DrawableCompositeImage::~DrawableCompositeImage( void )
500 {
501   delete _image;
502 }
503 // Assignment operator
504 Magick::DrawableCompositeImage& Magick::DrawableCompositeImage::operator=
505 (const Magick::DrawableCompositeImage& original_ )
506 {
507   // If not being set to ourself
508   if ( this != &original_ )
509     {
510       _composition = original_._composition;
511       _x = original_._x;
512       _y = original_._y;
513       _width = original_._width;
514       _height = original_._height;
515       Image* temp_image = new Image(*original_._image);
516       delete _image;
517       _image = temp_image;
518     }
519   return *this;
520 }
521 void Magick::DrawableCompositeImage::filename( const std::string &filename_ )
522 {
523   Image* temp_image = new Image(filename_);
524   delete _image;
525   _image = temp_image;
526 }
527 std::string Magick::DrawableCompositeImage::filename( void ) const
528 {
529   return _image->fileName();
530 }
531
532 void Magick::DrawableCompositeImage::image( const Magick::Image &image_ )
533 {
534   Image* temp_image = new Image(image_);
535   delete _image;
536   _image = temp_image;
537 }
538 Magick::Image Magick::DrawableCompositeImage::image( void ) const
539 {
540   return *_image;
541 }
542
543 // Specify image format used to output Base64 inlined image data.
544 void Magick::DrawableCompositeImage::magick( std::string magick_ )
545 {
546   _image->magick( magick_ );
547 }
548 std::string Magick::DrawableCompositeImage::magick( void )
549 {
550   return _image->magick();
551 }
552
553 void Magick::DrawableCompositeImage::operator()
554   ( MagickCore::DrawingWand * context_ ) const
555 {
556   MagickWand
557     *magick_wand;
558
559   magick_wand=NewMagickWandFromImage(_image->constImage());
560   (void) DrawComposite( context_, _composition, _x, _y, _width, _height,
561      magick_wand );
562   magick_wand=DestroyMagickWand(magick_wand);
563 }
564
565 Magick::DrawableBase* Magick::DrawableCompositeImage::copy() const
566 {
567   return new DrawableCompositeImage(*this);
568 }
569
570 // Ellipse
571 Magick::DrawableEllipse::~DrawableEllipse( void )
572 {
573 }
574 void Magick::DrawableEllipse::operator()
575   ( MagickCore::DrawingWand * context_ ) const
576 {
577   DrawEllipse( context_, _originX, _originY, _radiusX, _radiusY,
578                _arcStart, _arcEnd );
579 }
580 Magick::DrawableBase* Magick::DrawableEllipse::copy() const
581 {
582   return new DrawableEllipse(*this);
583 }
584
585 // Specify drawing fill color
586 Magick::DrawableFillColor::DrawableFillColor( const Magick::Color &color_ )
587   : _color(color_)
588 {
589 }
590 Magick::DrawableFillColor::DrawableFillColor
591 ( const Magick::DrawableFillColor& original_ )
592   : DrawableBase (original_),
593     _color(original_._color)
594 {
595 }
596 Magick::DrawableFillColor::~DrawableFillColor( void )
597 {
598 }
599 void Magick::DrawableFillColor::operator()
600   ( MagickCore::DrawingWand * context_ ) const
601 {
602   PixelInfo color = static_cast<PixelInfo>(_color);
603   PixelWand *pixel_wand=NewPixelWand();
604   PixelSetPixelColor(pixel_wand,&color);
605   DrawSetFillColor(context_,pixel_wand);
606   pixel_wand=DestroyPixelWand(pixel_wand);
607 }
608 Magick::DrawableBase* Magick::DrawableFillColor::copy() const
609 {
610   return new DrawableFillColor(*this);
611 }
612
613 // Specify drawing fill fule
614 Magick::DrawableFillRule::~DrawableFillRule ( void )
615 {
616 }
617 void Magick::DrawableFillRule::operator()
618   ( MagickCore::DrawingWand * context_ ) const
619 {
620   DrawSetFillRule( context_, _fillRule );
621 }
622 Magick::DrawableBase* Magick::DrawableFillRule::copy() const
623 {
624   return new DrawableFillRule(*this);
625 }
626
627 // Specify drawing fill alpha
628 Magick::DrawableFillAlpha::~DrawableFillAlpha ( void )
629 {
630 }
631 void Magick::DrawableFillAlpha::operator()
632   ( MagickCore::DrawingWand * context_ ) const
633 {
634   DrawSetFillAlpha( context_, _alpha );
635 }
636 Magick::DrawableBase* Magick::DrawableFillAlpha::copy() const
637 {
638   return new DrawableFillAlpha(*this);
639 }
640
641 // Specify text font
642 Magick::DrawableFont::DrawableFont ( const std::string &font_ )
643   : _font(font_),
644     _family(),
645     _style(Magick::AnyStyle),
646     _weight(400),
647     _stretch(Magick::NormalStretch)
648 {
649 }
650 Magick::DrawableFont::DrawableFont ( const std::string &family_,
651                                      Magick::StyleType style_,
652                                      const unsigned int weight_,
653                                      Magick::StretchType stretch_ )
654   : _font(),
655     _family(family_),
656     _style(style_),
657     _weight(weight_),
658     _stretch(stretch_)
659 {
660 }
661 Magick::DrawableFont::DrawableFont ( const Magick::DrawableFont& original_ )
662   : DrawableBase (original_),
663     _font(original_._font),
664     _family(original_._family),
665     _style(original_._style),
666     _weight(original_._weight),
667     _stretch(original_._stretch)
668 {
669 }
670 Magick::DrawableFont::~DrawableFont ( void )
671 {
672 }
673 void Magick::DrawableFont::operator()( MagickCore::DrawingWand * context_ ) const
674 {
675   // font
676   if(_font.length())
677     {
678       (void) DrawSetFont( context_, _font.c_str() );
679     }
680
681   if(_family.length())
682     {
683       // font-family
684       (void) DrawSetFontFamily( context_, _family.c_str() );
685
686       // font-style
687       DrawSetFontStyle( context_, _style );
688
689       // font-weight
690       DrawSetFontWeight( context_, _weight );
691
692       // font-stretch
693       DrawSetFontStretch( context_, _stretch );
694     }
695 }
696 Magick::DrawableBase* Magick::DrawableFont::copy() const
697 {
698   return new DrawableFont(*this);
699 }
700
701 // Specify text positioning gravity
702 Magick::DrawableGravity::~DrawableGravity ( void )
703 {
704 }
705 void Magick::DrawableGravity::operator()
706   ( MagickCore::DrawingWand * context_ ) const
707 {
708   DrawSetGravity( context_, _gravity );
709 }
710 Magick::DrawableBase* Magick::DrawableGravity::copy() const
711 {
712   return new DrawableGravity(*this);
713 }
714
715 // Line
716 Magick::DrawableLine::~DrawableLine ( void )
717 {
718 }
719 void Magick::DrawableLine::operator()( MagickCore::DrawingWand * context_ ) const
720 {
721   DrawLine( context_, _startX, _startY, _endX, _endY );
722 }
723 Magick::DrawableBase* Magick::DrawableLine::copy() const
724 {
725   return new DrawableLine(*this);
726 }
727
728 // Drawable Path
729 Magick::DrawablePath::DrawablePath ( const VPathList &path_ )
730   : _path(path_)
731 {
732 }
733 Magick::DrawablePath::DrawablePath ( const Magick::DrawablePath& original_ )
734   : DrawableBase (original_),
735     _path(original_._path)
736 {
737 }
738 Magick::DrawablePath::~DrawablePath ( void )
739 {
740 }
741 void Magick::DrawablePath::operator()( MagickCore::DrawingWand * context_ ) const
742 {
743   DrawPathStart( context_ );
744
745   for( VPathList::const_iterator p = _path.begin();
746        p != _path.end(); p++ )
747     p->operator()( context_ ); // FIXME, how to quit loop on error?
748
749   DrawPathFinish( context_ );
750 }
751 Magick::DrawableBase* Magick::DrawablePath::copy() const
752 {
753   return new DrawablePath(*this);
754 }
755
756 // Point
757 Magick::DrawablePoint::~DrawablePoint ( void )
758 {
759 }
760 void Magick::DrawablePoint::operator()( MagickCore::DrawingWand * context_ ) const
761 {
762   DrawPoint( context_, _x, _y );
763 }
764 Magick::DrawableBase* Magick::DrawablePoint::copy() const
765 {
766   return new DrawablePoint(*this);
767 }
768
769 // Text pointsize
770 Magick::DrawablePointSize::~DrawablePointSize ( void )
771 {
772 }
773 void Magick::DrawablePointSize::operator()
774   ( MagickCore::DrawingWand * context_ ) const
775 {
776   DrawSetFontSize( context_, _pointSize );
777 }
778 Magick::DrawableBase* Magick::DrawablePointSize::copy() const
779 {
780   return new DrawablePointSize(*this);
781 }
782
783 // Polygon (Coordinate list must contain at least three members)
784 Magick::DrawablePolygon::DrawablePolygon ( const CoordinateList &coordinates_ )
785   : _coordinates(coordinates_)
786 {
787 }
788 Magick::DrawablePolygon::DrawablePolygon
789 ( const Magick::DrawablePolygon& original_ )
790   : DrawableBase (original_),
791     _coordinates(original_._coordinates)
792 {
793 }
794 Magick::DrawablePolygon::~DrawablePolygon ( void )
795 {
796 }
797 void Magick::DrawablePolygon::operator()
798   ( MagickCore::DrawingWand * context_ ) const
799 {
800   size_t num_coords = (size_t) _coordinates.size();
801   PointInfo *coordinates = new PointInfo[num_coords];
802
803   PointInfo *q = coordinates;
804   CoordinateList::const_iterator p = _coordinates.begin();
805
806   while( p != _coordinates.end() )
807     {
808       q->x = p->x();
809       q->y = p->y();
810       q++;
811       p++;
812     }
813
814   DrawPolygon( context_, num_coords, coordinates );
815   delete [] coordinates;
816 }
817 Magick::DrawableBase* Magick::DrawablePolygon::copy() const
818 {
819   return new DrawablePolygon(*this);
820 }
821
822 // Polyline (Coordinate list must contain at least three members)
823 Magick::DrawablePolyline::DrawablePolyline
824 ( const CoordinateList &coordinates_ )
825   : _coordinates(coordinates_)
826 {
827 }
828 Magick::DrawablePolyline::DrawablePolyline
829 ( const Magick::DrawablePolyline& original_ )
830   : DrawableBase (original_),
831     _coordinates(original_._coordinates)
832 {
833 }
834 Magick::DrawablePolyline::~DrawablePolyline ( void )
835 {
836 }
837 void Magick::DrawablePolyline::operator()
838   ( MagickCore::DrawingWand * context_ ) const
839 {
840   size_t num_coords = (size_t) _coordinates.size();
841   PointInfo *coordinates = new PointInfo[num_coords];
842
843   PointInfo *q = coordinates;
844   CoordinateList::const_iterator p = _coordinates.begin();
845
846   while( p != _coordinates.end() )
847     {
848       q->x = p->x();
849       q->y = p->y();
850       q++;
851       p++;
852     }
853
854   DrawPolyline( context_, num_coords, coordinates );
855   delete [] coordinates;
856 }
857 Magick::DrawableBase* Magick::DrawablePolyline::copy() const
858 {
859   return new DrawablePolyline(*this);
860 }
861
862 // Pop Graphic Context
863 Magick::DrawablePopGraphicContext::~DrawablePopGraphicContext ( void )
864 {
865 }
866 void Magick::DrawablePopGraphicContext::operator()
867   ( MagickCore::DrawingWand * context_ ) const
868 {
869   PopDrawingWand( context_ );
870 }
871 Magick::DrawableBase* Magick::DrawablePopGraphicContext::copy() const
872 {
873   return new DrawablePopGraphicContext(*this);
874 }
875
876 // Push Graphic Context
877 Magick::DrawablePushGraphicContext::~DrawablePushGraphicContext ( void )
878 {
879 }
880 void Magick::DrawablePushGraphicContext::operator()
881   ( MagickCore::DrawingWand * context_ ) const
882 {
883   PushDrawingWand( context_ );
884 }
885 Magick::DrawableBase* Magick::DrawablePushGraphicContext::copy() const
886 {
887   return new DrawablePushGraphicContext(*this);
888 }
889
890 // Pop (terminate) Pattern definition
891 Magick::DrawablePopPattern::~DrawablePopPattern ( void )
892 {
893 }
894 void Magick::DrawablePopPattern::operator()
895   ( MagickCore::DrawingWand * context_ ) const
896 {
897   (void) DrawPopPattern( context_ );
898 }
899 Magick::DrawableBase* Magick::DrawablePopPattern::copy() const
900 {
901   return new DrawablePopPattern(*this);
902 }
903
904 // Push Pattern definition
905 Magick::DrawablePushPattern::DrawablePushPattern
906 ( const std::string &id_, ssize_t x_, ssize_t y_,
907   size_t width_, size_t height_ )
908   : _id(id_),
909     _x(x_),
910     _y(y_),
911     _width(width_),
912     _height(height_)
913 {
914 }
915 Magick::DrawablePushPattern::DrawablePushPattern
916 ( const Magick::DrawablePushPattern& original_ )
917   : DrawableBase (original_),
918     _id(original_._id),
919     _x(original_._x),
920     _y(original_._y),
921     _width(original_._width),
922     _height(original_._height)
923 {
924 }
925 Magick::DrawablePushPattern::~DrawablePushPattern ( void )
926 {
927 }
928 void Magick::DrawablePushPattern::operator()
929   ( MagickCore::DrawingWand * context_ ) const
930 {
931   (void) DrawPushPattern( context_, _id.c_str(), _x, _y, _width, _height );
932 }
933 Magick::DrawableBase* Magick::DrawablePushPattern::copy() const
934 {
935   return new DrawablePushPattern(*this);
936 }
937
938 // Rectangle
939 Magick::DrawableRectangle::~DrawableRectangle ( void )
940 {
941 }
942 void Magick::DrawableRectangle::operator()
943   ( MagickCore::DrawingWand * context_ ) const
944 {
945   DrawRectangle( context_, _upperLeftX, _upperLeftY,
946                  _lowerRightX, _lowerRightY );
947 }
948 Magick::DrawableBase* Magick::DrawableRectangle::copy() const
949 {
950   return new DrawableRectangle(*this);
951 }
952
953 // Apply Rotation
954 Magick::DrawableRotation::~DrawableRotation ( void )
955 {
956 }
957 void Magick::DrawableRotation::operator()
958   ( MagickCore::DrawingWand * context_ ) const
959 {
960   DrawRotate( context_, _angle );
961 }
962 Magick::DrawableBase* Magick::DrawableRotation::copy() const
963 {
964   return new DrawableRotation(*this);
965 }
966
967 // Round Rectangle
968 Magick::DrawableRoundRectangle::~DrawableRoundRectangle ( void )
969 {
970 }
971 void Magick::DrawableRoundRectangle::operator()
972   ( MagickCore::DrawingWand * context_ ) const
973 {
974   DrawRoundRectangle( context_, _centerX,_centerY, _width,_hight,
975                       _cornerWidth, _cornerHeight);
976 }
977 Magick::DrawableBase* Magick::DrawableRoundRectangle::copy() const
978 {
979   return new DrawableRoundRectangle(*this);
980 }
981
982 // Apply Scaling
983 Magick::DrawableScaling::~DrawableScaling ( void )
984 {
985 }
986 void Magick::DrawableScaling::operator()
987   ( MagickCore::DrawingWand * context_ ) const
988 {
989   DrawScale( context_, _x, _y );
990 }
991 Magick::DrawableBase* Magick::DrawableScaling::copy() const
992 {
993   return new DrawableScaling(*this);
994 }
995
996 // Apply Skew in the X direction
997 Magick::DrawableSkewX::~DrawableSkewX ( void )
998 {
999 }
1000 void Magick::DrawableSkewX::operator()
1001   ( MagickCore::DrawingWand * context_ ) const
1002 {
1003   DrawSkewX( context_, _angle );
1004 }
1005 Magick::DrawableBase* Magick::DrawableSkewX::copy() const
1006 {
1007   return new DrawableSkewX(*this);
1008 }
1009
1010 // Apply Skew in the Y direction
1011 Magick::DrawableSkewY::~DrawableSkewY ( void )
1012 {
1013 }
1014 void Magick::DrawableSkewY::operator()( MagickCore::DrawingWand * context_ ) const
1015 {
1016   DrawSkewY( context_, _angle );
1017 }
1018 Magick::DrawableBase* Magick::DrawableSkewY::copy() const
1019 {
1020   return new DrawableSkewY(*this);
1021 }
1022
1023 Magick::DrawableDashArray::DrawableDashArray(const double* dasharray_)
1024   : _size(0),
1025     _dasharray(0)
1026 {
1027   dasharray(dasharray_);
1028 }
1029
1030 Magick::DrawableDashArray::DrawableDashArray(
1031   const Magick::DrawableDashArray& original_)
1032   : DrawableBase (original_),
1033     _size(original_._size),
1034     _dasharray(new double[_size+1])
1035 {
1036   // Copy elements
1037   {
1038     for (size_t i=0; i < _size; i++)
1039       _dasharray[i]=original_._dasharray[i];
1040     _dasharray[_size]=0.0;
1041   }
1042 }
1043
1044 Magick::DrawableDashArray::~DrawableDashArray(void)
1045 {
1046   delete [] _dasharray;
1047   _size=0;
1048   _dasharray=0;
1049 }
1050
1051 Magick::DrawableDashArray& Magick::DrawableDashArray::operator=(
1052   const Magick::DrawableDashArray &original_)
1053 {
1054   if( this != &original_ )
1055     {
1056       delete [] _dasharray;
1057       _size=original_._size;
1058       _dasharray = new double[_size+1];
1059       // Copy elements
1060       {
1061         for (size_t i=0; i < _size; i++)
1062           _dasharray[i]=original_._dasharray[i];
1063         _dasharray[_size]=0.0;
1064       }
1065     }
1066   return *this;
1067 }
1068
1069 void Magick::DrawableDashArray::operator()(
1070   MagickCore::DrawingWand *context_) const
1071 {
1072   (void) DrawSetStrokeDashArray(context_,(const unsigned long) _size,_dasharray);
1073 }
1074
1075 Magick::DrawableBase *Magick::DrawableDashArray::copy() const
1076 {
1077   return(new DrawableDashArray(*this));
1078 }
1079
1080 void Magick::DrawableDashArray::dasharray(const double* dasharray_)
1081 {
1082   size_t
1083     n;
1084
1085   delete [] _dasharray;
1086   _size=0;
1087   _dasharray=0;
1088
1089   if (dasharray_)
1090     {
1091       // Count elements in dash array
1092       n=0;
1093       {
1094         const double *p = dasharray_;
1095         while(*p++ != 0.0)
1096           n++;
1097       }
1098       _size=n;
1099
1100       // Allocate elements
1101       _dasharray=new double[_size+1];
1102       // Copy elements
1103       {
1104         for (size_t i=0; i < _size; i++)
1105           _dasharray[i]=dasharray_[i];
1106         _dasharray[_size]=0.0;
1107       }
1108     }
1109 }
1110
1111 // Stroke dashoffset
1112 Magick::DrawableDashOffset::~DrawableDashOffset ( void )
1113 {
1114 }
1115 void Magick::DrawableDashOffset::operator()
1116   ( MagickCore::DrawingWand * context_ ) const
1117 {
1118   DrawSetStrokeDashOffset( context_, _offset );
1119 }
1120 Magick::DrawableBase* Magick::DrawableDashOffset::copy() const
1121 {
1122   return new DrawableDashOffset(*this);
1123 }
1124
1125 // Stroke linecap
1126 Magick::DrawableStrokeLineCap::~DrawableStrokeLineCap ( void )
1127 {
1128 }
1129 void Magick::DrawableStrokeLineCap::operator()
1130   ( MagickCore::DrawingWand * context_ ) const
1131 {
1132   DrawSetStrokeLineCap( context_, _linecap );
1133 }
1134 Magick::DrawableBase* Magick::DrawableStrokeLineCap::copy() const
1135 {
1136   return new DrawableStrokeLineCap(*this);
1137 }
1138
1139 // Stroke linejoin
1140 Magick::DrawableStrokeLineJoin::~DrawableStrokeLineJoin ( void )
1141 {
1142 }
1143 void Magick::DrawableStrokeLineJoin::operator()
1144   ( MagickCore::DrawingWand * context_ ) const
1145 {
1146   DrawSetStrokeLineJoin( context_, _linejoin );
1147 }
1148 Magick::DrawableBase* Magick::DrawableStrokeLineJoin::copy() const
1149 {
1150   return new DrawableStrokeLineJoin(*this);
1151 }
1152
1153 // Stroke miterlimit
1154 Magick::DrawableMiterLimit::~DrawableMiterLimit ( void )
1155 {
1156 }
1157 void Magick::DrawableMiterLimit::operator()
1158   ( MagickCore::DrawingWand * context_ ) const
1159 {
1160   DrawSetStrokeMiterLimit( context_, _miterlimit );
1161 }
1162 Magick::DrawableBase* Magick::DrawableMiterLimit::copy() const
1163 {
1164   return new DrawableMiterLimit(*this);
1165 }
1166
1167 // Stroke antialias
1168 Magick::DrawableStrokeAntialias::~DrawableStrokeAntialias ( void )
1169 {
1170 }
1171 void Magick::DrawableStrokeAntialias::operator()
1172 ( MagickCore::DrawingWand * context_ ) const
1173 {
1174   DrawSetStrokeAntialias( context_, static_cast<MagickBooleanType>
1175     (_flag ? MagickTrue : MagickFalse) );
1176 }
1177 Magick::DrawableBase* Magick::DrawableStrokeAntialias::copy() const
1178 {
1179   return new DrawableStrokeAntialias(*this);
1180 }
1181
1182 // Stroke color
1183 Magick::DrawableStrokeColor::DrawableStrokeColor
1184 ( const Magick::Color &color_ )
1185   : _color(color_)
1186 {
1187 }
1188 Magick::DrawableStrokeColor::DrawableStrokeColor
1189 ( const Magick::DrawableStrokeColor& original_ )
1190   : DrawableBase (original_),
1191     _color(original_._color)
1192 {
1193 }
1194 Magick::DrawableStrokeColor::~DrawableStrokeColor ( void )
1195 {
1196 }
1197 void Magick::DrawableStrokeColor::operator()
1198   ( MagickCore::DrawingWand * context_ ) const
1199 {
1200   PixelInfo color = static_cast<PixelInfo>(_color);
1201   PixelWand *pixel_wand=NewPixelWand();
1202   PixelSetPixelColor(pixel_wand,&color);
1203   DrawSetStrokeColor(context_,pixel_wand);
1204   pixel_wand=DestroyPixelWand(pixel_wand);
1205 }
1206 Magick::DrawableBase* Magick::DrawableStrokeColor::copy() const
1207 {
1208   return new DrawableStrokeColor(*this);
1209 }
1210
1211 // Stroke alpha
1212 Magick::DrawableStrokeAlpha::~DrawableStrokeAlpha ( void )
1213 {
1214 }
1215 void Magick::DrawableStrokeAlpha::operator()
1216   ( MagickCore::DrawingWand * context_ ) const
1217 {
1218   DrawSetStrokeAlpha( context_, _alpha );
1219 }
1220 Magick::DrawableBase* Magick::DrawableStrokeAlpha::copy() const
1221 {
1222   return new DrawableStrokeAlpha(*this);
1223 }
1224
1225 // Stroke width
1226 Magick::DrawableStrokeWidth::~DrawableStrokeWidth ( void )
1227 {
1228 }
1229 void Magick::DrawableStrokeWidth::operator()
1230   ( MagickCore::DrawingWand * context_ ) const
1231 {
1232   DrawSetStrokeWidth( context_, _width );
1233 }
1234 Magick::DrawableBase* Magick::DrawableStrokeWidth::copy() const
1235 {
1236   return new DrawableStrokeWidth(*this);
1237 }
1238
1239 // Draw text at point
1240 Magick::DrawableText::DrawableText ( const double x_, const double y_,
1241                                      const std::string &text_ )
1242   : _x(x_),
1243     _y(y_),
1244     _text(text_),
1245     _encoding()
1246 {
1247 }
1248 Magick::DrawableText::DrawableText ( const double x_, const double y_,
1249                                      const std::string &text_,  const std::string &encoding_)
1250   : _x(x_),
1251     _y(y_),
1252     _text(text_),
1253     _encoding(encoding_)
1254 {
1255 }
1256 Magick::DrawableText::DrawableText( const Magick::DrawableText& original_ )
1257   : DrawableBase (original_),
1258     _x(original_._x),
1259     _y(original_._y),
1260     _text(original_._text),
1261     _encoding(original_._encoding)
1262 {
1263 }
1264 Magick::DrawableText::~DrawableText ( void )
1265 {
1266 }
1267 void Magick::DrawableText::operator()
1268   ( MagickCore::DrawingWand * context_ ) const
1269 {
1270   DrawSetTextEncoding( context_, _encoding.c_str() );
1271   DrawAnnotation( context_, _x, _y,
1272                   reinterpret_cast<const unsigned char*>(_text.c_str()) );
1273 }
1274 Magick::DrawableBase* Magick::DrawableText::copy() const
1275 {
1276   return new DrawableText(*this);
1277 }
1278
1279 // Text antialias
1280 Magick::DrawableTextAntialias::DrawableTextAntialias ( bool flag_ )
1281   : _flag(flag_)
1282 {
1283 }
1284 Magick::DrawableTextAntialias::DrawableTextAntialias( const Magick::DrawableTextAntialias &original_ )
1285   : DrawableBase (original_),
1286     _flag(original_._flag)
1287 {
1288 }
1289 Magick::DrawableTextAntialias::~DrawableTextAntialias ( void )
1290 {
1291 }
1292 void Magick::DrawableTextAntialias::operator()
1293   ( MagickCore::DrawingWand * context_ ) const
1294 {
1295   DrawSetTextAntialias( context_, static_cast<MagickBooleanType>
1296     (_flag ? MagickTrue : MagickFalse) );
1297 }
1298 Magick::DrawableBase* Magick::DrawableTextAntialias::copy() const
1299 {
1300   return new DrawableTextAntialias(*this);
1301 }
1302
1303 // Decoration (text decoration)
1304 Magick::DrawableTextDecoration::DrawableTextDecoration
1305   ( Magick::DecorationType decoration_ )
1306     : _decoration(decoration_)
1307 {
1308 }
1309 Magick::DrawableTextDecoration::DrawableTextDecoration
1310   ( const Magick::DrawableTextDecoration &original_ )
1311     : DrawableBase (original_),
1312       _decoration(original_._decoration)
1313 {
1314 }
1315 Magick::DrawableTextDecoration::~DrawableTextDecoration( void )
1316 {
1317 }
1318 void Magick::DrawableTextDecoration::operator()
1319   ( MagickCore::DrawingWand * context_ ) const
1320 {
1321   DrawSetTextDecoration( context_, _decoration );
1322 }
1323 Magick::DrawableBase* Magick::DrawableTextDecoration::copy() const
1324 {
1325   return new DrawableTextDecoration(*this);
1326 }
1327
1328 // DrawableTextDirection
1329 Magick::DrawableTextDirection::DrawableTextDirection(
1330   DirectionType direction_)
1331   : _direction(direction_)
1332 {
1333 }
1334
1335 Magick::DrawableTextDirection::~DrawableTextDirection(void)
1336 {
1337 }
1338
1339 void Magick::DrawableTextDirection::operator()(
1340   MagickCore::DrawingWand *context_) const
1341 {
1342   DrawSetTextDirection(context_,_direction);
1343 }
1344
1345 void Magick::DrawableTextDirection::direction(DirectionType direction_)
1346 {
1347   _direction=direction_;
1348 }
1349
1350 Magick::DirectionType Magick::DrawableTextDirection::direction(void) const
1351 {
1352   return(_direction);
1353 }
1354
1355 Magick::DrawableBase *Magick::DrawableTextDirection::copy() const
1356 {
1357   return new DrawableTextDirection(*this);
1358 }
1359
1360 // DrawableTextInterlineSpacing
1361 Magick::DrawableTextInterlineSpacing::DrawableTextInterlineSpacing(
1362   double spacing_)
1363   : _spacing(spacing_)
1364 {
1365 }
1366
1367 Magick::DrawableTextInterlineSpacing::~DrawableTextInterlineSpacing(void)
1368 {
1369 }
1370
1371 void Magick::DrawableTextInterlineSpacing::operator()(
1372   MagickCore::DrawingWand *context_) const
1373 {
1374   DrawSetTextInterlineSpacing(context_,_spacing);
1375 }
1376
1377 void Magick::DrawableTextInterlineSpacing::spacing(double spacing_)
1378 {
1379   _spacing=spacing_;
1380 }
1381
1382 double Magick::DrawableTextInterlineSpacing::spacing(void) const
1383 {
1384   return(_spacing);
1385 }
1386
1387 Magick::DrawableBase *Magick::DrawableTextInterlineSpacing::copy() const
1388 {
1389   return new DrawableTextInterlineSpacing(*this);
1390 }
1391
1392 // DrawableTextInterwordSpacing
1393 Magick::DrawableTextInterwordSpacing::DrawableTextInterwordSpacing(
1394   double spacing_)
1395   : _spacing(spacing_)
1396 {
1397 }
1398
1399 Magick::DrawableTextInterwordSpacing::~DrawableTextInterwordSpacing(void)
1400 {
1401 }
1402
1403 void Magick::DrawableTextInterwordSpacing::operator()(
1404   MagickCore::DrawingWand *context_) const
1405 {
1406   DrawSetTextInterwordSpacing(context_,_spacing);
1407 }
1408
1409 void Magick::DrawableTextInterwordSpacing::spacing(double spacing_)
1410 {
1411   _spacing=spacing_;
1412 }
1413
1414 double Magick::DrawableTextInterwordSpacing::spacing(void) const
1415 {
1416   return(_spacing);
1417 }
1418
1419 Magick::DrawableBase *Magick::DrawableTextInterwordSpacing::copy() const
1420 {
1421   return new DrawableTextInterwordSpacing(*this);
1422 }
1423
1424 // DrawableTextKerning
1425 Magick::DrawableTextKerning::DrawableTextKerning(
1426   double kerning_)
1427   : _kerning(kerning_)
1428 {
1429 }
1430
1431 Magick::DrawableTextKerning::~DrawableTextKerning(void)
1432 {
1433 }
1434
1435 void Magick::DrawableTextKerning::operator()(
1436   MagickCore::DrawingWand *context_) const
1437 {
1438   DrawSetTextKerning(context_,_kerning);
1439 }
1440
1441 void Magick::DrawableTextKerning::kerning(double kerning_)
1442 {
1443   _kerning=kerning_;
1444 }
1445
1446 double Magick::DrawableTextKerning::kerning(void) const
1447 {
1448   return(_kerning);
1449 }
1450
1451 Magick::DrawableBase *Magick::DrawableTextKerning::copy() const
1452 {
1453   return new DrawableTextKerning(*this);
1454 }
1455
1456 // Set text undercolor
1457 Magick::DrawableTextUnderColor::DrawableTextUnderColor
1458 ( const Magick::Color &color_ )
1459   : _color(color_)
1460 {
1461 }
1462 Magick::DrawableTextUnderColor::DrawableTextUnderColor
1463 ( const Magick::DrawableTextUnderColor& original_ )
1464   : DrawableBase (original_),
1465     _color(original_._color)
1466 {
1467 }
1468 Magick::DrawableTextUnderColor::~DrawableTextUnderColor ( void )
1469 {
1470 }
1471 void Magick::DrawableTextUnderColor::operator()
1472   ( MagickCore::DrawingWand * context_ ) const
1473 {
1474   PixelInfo color = static_cast<PixelInfo>(_color);
1475   PixelWand *pixel_wand=NewPixelWand();
1476   PixelSetPixelColor(pixel_wand,&color);
1477   DrawSetTextUnderColor(context_,pixel_wand);
1478   pixel_wand=DestroyPixelWand(pixel_wand);
1479 }
1480 Magick::DrawableBase* Magick::DrawableTextUnderColor::copy() const
1481 {
1482   return new DrawableTextUnderColor(*this);
1483 }
1484
1485 // Apply Translation
1486 Magick::DrawableTranslation::~DrawableTranslation ( void )
1487 {
1488 }
1489 void Magick::DrawableTranslation::operator()
1490   ( MagickCore::DrawingWand * context_ ) const
1491 {
1492   DrawTranslate( context_, _x, _y );
1493 }
1494 Magick::DrawableBase* Magick::DrawableTranslation::copy() const
1495 {
1496   return new DrawableTranslation(*this);
1497 }
1498
1499 // Set the size of the viewbox
1500 Magick::DrawableViewbox::~DrawableViewbox ( void )
1501 {
1502 }
1503 void Magick::DrawableViewbox::operator()
1504   ( MagickCore::DrawingWand * context_ ) const
1505 {
1506   DrawSetViewbox( context_, _x1, _y1, _x2, _y2 );
1507 }
1508 Magick::DrawableBase* Magick::DrawableViewbox::copy() const
1509 {
1510   return new DrawableViewbox(*this);
1511 }
1512
1513 //
1514 // Path Classes
1515 //
1516
1517 //
1518 // PathArcArgs
1519 //
1520 MagickPPExport int Magick::operator == ( const Magick::PathArcArgs& /*left_*/,
1521                                         const Magick::PathArcArgs& /*right_*/ )
1522 {
1523   return ( 1 );
1524 }
1525 MagickPPExport int Magick::operator != ( const Magick::PathArcArgs& /*left_*/,
1526                                         const Magick::PathArcArgs& /*right_*/ )
1527 {
1528   return ( 0 );
1529 }
1530 MagickPPExport int Magick::operator > ( const Magick::PathArcArgs& /*left_*/,
1531                                        const Magick::PathArcArgs& /*right_*/ )
1532 {
1533   return ( 0 );
1534 }
1535 MagickPPExport int Magick::operator <  ( const Magick::PathArcArgs& /*left_*/,
1536                                         const Magick::PathArcArgs& /*right_*/ )
1537 {
1538   return  ( false );
1539 }
1540 MagickPPExport int Magick::operator >= ( const Magick::PathArcArgs& left_,
1541                                         const Magick::PathArcArgs& right_ )
1542 {
1543   return ( ( left_ > right_ ) || ( left_ == right_ ) );
1544 }
1545 MagickPPExport int Magick::operator <= ( const Magick::PathArcArgs& left_,
1546                                         const Magick::PathArcArgs& right_ )
1547 {
1548   return ( ( left_ < right_ ) || ( left_ == right_ ) );
1549 }
1550 // Default constructor
1551 Magick::PathArcArgs::PathArcArgs( void )
1552   :  _radiusX(0),
1553      _radiusY(0),
1554      _xAxisRotation(0),
1555      _largeArcFlag(false),
1556      _sweepFlag(false),
1557      _x(0),
1558      _y(0)
1559 {
1560 }
1561 // Normal constructor
1562 Magick::PathArcArgs::PathArcArgs( double radiusX_, double radiusY_,
1563                                   double xAxisRotation_, bool largeArcFlag_,
1564                                   bool sweepFlag_, double x_, double y_ )
1565   : _radiusX(radiusX_),
1566     _radiusY(radiusY_),
1567     _xAxisRotation(xAxisRotation_),
1568     _largeArcFlag(largeArcFlag_),
1569     _sweepFlag(sweepFlag_),
1570     _x(x_),
1571     _y(y_)
1572 {
1573 }
1574 // Copy constructor
1575 Magick::PathArcArgs::PathArcArgs( const Magick::PathArcArgs &original_ )
1576   :  _radiusX(original_._radiusX),
1577      _radiusY(original_._radiusY),
1578      _xAxisRotation(original_._xAxisRotation),
1579      _largeArcFlag(original_._largeArcFlag),
1580      _sweepFlag(original_._sweepFlag),
1581      _x(original_._x),
1582      _y(original_._y)
1583 {
1584 }
1585 // Destructor
1586 Magick::PathArcArgs::~PathArcArgs ( void )
1587 {
1588 }
1589
1590 // Path Arc
1591 Magick::PathArcAbs::PathArcAbs ( const Magick::PathArcArgs &coordinates_ )
1592   : _coordinates(1,coordinates_)
1593 {
1594 }
1595 Magick::PathArcAbs::PathArcAbs ( const PathArcArgsList &coordinates_ )
1596   : _coordinates(coordinates_)
1597 {
1598 }
1599 Magick::PathArcAbs::PathArcAbs ( const Magick::PathArcAbs& original_ )
1600   : VPathBase (original_),
1601     _coordinates(original_._coordinates)
1602 {
1603 }
1604 Magick::PathArcAbs::~PathArcAbs ( void )
1605 {
1606 }
1607 void Magick::PathArcAbs::operator()( MagickCore::DrawingWand * context_ ) const
1608 {
1609   for( PathArcArgsList::const_iterator p = _coordinates.begin();
1610        p != _coordinates.end(); p++ )
1611     {
1612       DrawPathEllipticArcAbsolute( context_, p->radiusX(), p->radiusY(),
1613                                    p->xAxisRotation(), (MagickBooleanType) p->largeArcFlag(),
1614                                    (MagickBooleanType) p->sweepFlag(), p->x(), p->y() );
1615     }
1616 }
1617 Magick::VPathBase* Magick::PathArcAbs::copy() const
1618 {
1619   return new PathArcAbs(*this);
1620 }
1621
1622 Magick::PathArcRel::PathArcRel ( const Magick::PathArcArgs &coordinates_ )
1623   : _coordinates(1,coordinates_)
1624 {
1625 }
1626 Magick::PathArcRel::PathArcRel ( const PathArcArgsList &coordinates_ )
1627   : _coordinates(coordinates_)
1628 {
1629 }
1630 Magick::PathArcRel::PathArcRel ( const Magick::PathArcRel& original_ )
1631   : VPathBase (original_),
1632     _coordinates(original_._coordinates)
1633 {
1634 }
1635 Magick::PathArcRel::~PathArcRel ( void )
1636 {
1637 }
1638 void Magick::PathArcRel::operator()( MagickCore::DrawingWand * context_ ) const
1639 {
1640   for( PathArcArgsList::const_iterator p = _coordinates.begin();
1641        p != _coordinates.end(); p++ )
1642     {
1643       DrawPathEllipticArcRelative( context_, p->radiusX(), p->radiusY(),
1644                                    p->xAxisRotation(), (MagickBooleanType) p->largeArcFlag(),
1645                                    (MagickBooleanType) p->sweepFlag(), p->x(), p->y() );
1646     }
1647 }
1648 Magick::VPathBase* Magick::PathArcRel::copy() const
1649 {
1650   return new PathArcRel(*this);
1651 }
1652
1653 //
1654 // Path Closepath
1655 //
1656 Magick::PathClosePath::~PathClosePath ( void )
1657 {
1658 }
1659 void Magick::PathClosePath::operator()( MagickCore::DrawingWand * context_ ) const
1660 {
1661   DrawPathClose( context_ );
1662 }
1663 Magick::VPathBase* Magick::PathClosePath::copy() const
1664 {
1665   return new PathClosePath(*this);
1666 }
1667
1668 //
1669 // Path Curveto (Cubic Bezier)
1670 //
1671 MagickPPExport int Magick::operator == ( const Magick::PathCurvetoArgs& /*left_*/,
1672                                         const Magick::PathCurvetoArgs& /*right_*/ )
1673 {
1674   return ( 1 );
1675 }
1676 MagickPPExport int Magick::operator != ( const Magick::PathCurvetoArgs& /*left_*/,
1677                                         const Magick::PathCurvetoArgs& /*right_*/ )
1678 {
1679   return ( 0 );
1680 }
1681 MagickPPExport int Magick::operator > ( const Magick::PathCurvetoArgs& /*left_*/,
1682                                        const Magick::PathCurvetoArgs& /*right_*/ )
1683 {
1684   return ( 0 );
1685 }
1686 MagickPPExport int Magick::operator <  ( const Magick::PathCurvetoArgs& /*left_*/,
1687                                         const Magick::PathCurvetoArgs& /*right_*/ )
1688 {
1689   return  ( false );
1690 }
1691 MagickPPExport int Magick::operator >= ( const Magick::PathCurvetoArgs& left_,
1692                                         const Magick::PathCurvetoArgs& right_ )
1693 {
1694   return ( ( left_ > right_ ) || ( left_ == right_ ) );
1695 }
1696 MagickPPExport int Magick::operator <= ( const Magick::PathCurvetoArgs& left_,
1697                                         const Magick::PathCurvetoArgs& right_ )
1698 {
1699   return ( ( left_ < right_ ) || ( left_ == right_ ) );
1700 }
1701 // Default constructor
1702 Magick::PathCurvetoArgs::PathCurvetoArgs( void )
1703   : _x1(0),
1704     _y1(0),
1705     _x2(0),
1706     _y2(0),
1707     _x(0),
1708     _y(0)
1709 {
1710 }
1711 // Normal constructor
1712 Magick::PathCurvetoArgs::PathCurvetoArgs( double x1_, double y1_,
1713                                           double x2_, double y2_,
1714                                           double x_, double y_ )
1715   : _x1(x1_),
1716     _y1(y1_),
1717     _x2(x2_),
1718     _y2(y2_),
1719     _x(x_),
1720     _y(y_)
1721 {
1722 }
1723 // Copy constructor
1724 Magick::PathCurvetoArgs::PathCurvetoArgs( const PathCurvetoArgs &original_ )
1725   : _x1(original_._x1),
1726     _y1(original_._y1),
1727     _x2(original_._x2),
1728     _y2(original_._y2),
1729     _x(original_._x),
1730     _y(original_._y)
1731 {
1732 }
1733 // Destructor
1734 Magick::PathCurvetoArgs::~PathCurvetoArgs ( void )
1735 {
1736 }
1737
1738 Magick::PathCurvetoAbs::PathCurvetoAbs ( const Magick::PathCurvetoArgs &args_ )
1739   : _args(1,args_)
1740 {
1741 }
1742 Magick::PathCurvetoAbs::PathCurvetoAbs ( const PathCurveToArgsList &args_ )
1743   : _args(args_)
1744 {
1745 }
1746 Magick::PathCurvetoAbs::PathCurvetoAbs
1747  ( const Magick::PathCurvetoAbs& original_ )
1748    : VPathBase (original_),
1749      _args(original_._args)
1750 {
1751 }
1752 Magick::PathCurvetoAbs::~PathCurvetoAbs ( void )
1753 {
1754 }
1755 void Magick::PathCurvetoAbs::operator()
1756   ( MagickCore::DrawingWand * context_ ) const
1757 {
1758   for( PathCurveToArgsList::const_iterator p = _args.begin();
1759        p != _args.end(); p++ )
1760     {
1761       DrawPathCurveToAbsolute( context_, p->x1(), p->y1(), p->x2(), p->y2(),
1762                                p->x(), p->y() );
1763     }
1764 }
1765 Magick::VPathBase* Magick::PathCurvetoAbs::copy() const
1766 {
1767   return new PathCurvetoAbs(*this);
1768 }
1769 Magick::PathCurvetoRel::PathCurvetoRel ( const Magick::PathCurvetoArgs &args_ )
1770   : _args(1,args_)
1771 {
1772 }
1773 Magick::PathCurvetoRel::PathCurvetoRel ( const PathCurveToArgsList &args_ )
1774   : _args(args_)
1775 {
1776 }
1777 Magick::PathCurvetoRel::PathCurvetoRel
1778 ( const Magick::PathCurvetoRel& original_ )
1779   : VPathBase (original_),
1780     _args(original_._args)
1781 {
1782 }
1783 Magick::PathCurvetoRel::~PathCurvetoRel ( void )
1784 {
1785 }
1786 void Magick::PathCurvetoRel::operator()
1787   ( MagickCore::DrawingWand * context_ ) const
1788 {
1789   for( PathCurveToArgsList::const_iterator p = _args.begin();
1790        p != _args.end(); p++ )
1791     {
1792       DrawPathCurveToRelative( context_, p->x1(), p->y1(), p->x2(), p->y2(),
1793                                p->x(), p->y() );
1794     }
1795 }
1796 Magick::VPathBase* Magick::PathCurvetoRel::copy() const
1797 {
1798   return new PathCurvetoRel(*this);
1799 }
1800 Magick::PathSmoothCurvetoAbs::PathSmoothCurvetoAbs
1801 ( const Magick::Coordinate &coordinates_ )
1802   : _coordinates(1,coordinates_)
1803 {
1804 }
1805 Magick::PathSmoothCurvetoAbs::PathSmoothCurvetoAbs
1806 ( const CoordinateList &coordinates_ )
1807   : _coordinates(coordinates_)
1808 {
1809 }
1810 Magick::PathSmoothCurvetoAbs::PathSmoothCurvetoAbs
1811 ( const Magick::PathSmoothCurvetoAbs& original_ )
1812   : VPathBase (original_),
1813     _coordinates(original_._coordinates)
1814 {
1815 }
1816 Magick::PathSmoothCurvetoAbs::~PathSmoothCurvetoAbs ( void )
1817 {
1818 }
1819 void Magick::PathSmoothCurvetoAbs::operator()
1820   ( MagickCore::DrawingWand * context_ ) const
1821 {
1822   for( CoordinateList::const_iterator p = _coordinates.begin();
1823        p != _coordinates.end(); p++ )
1824     {
1825       double x2 = p->x();
1826       double y2 = p->y();
1827       p++;
1828       if(p != _coordinates.end() )
1829         DrawPathCurveToSmoothAbsolute( context_, x2, y2, p->x(), p->y() );
1830     }
1831 }
1832 Magick::VPathBase* Magick::PathSmoothCurvetoAbs::copy() const
1833 {
1834   return new PathSmoothCurvetoAbs(*this);
1835 }
1836 Magick::PathSmoothCurvetoRel::PathSmoothCurvetoRel
1837 ( const Magick::Coordinate &coordinates_ )
1838   : _coordinates(1,coordinates_)
1839 {
1840 }
1841 Magick::PathSmoothCurvetoRel::PathSmoothCurvetoRel
1842 ( const CoordinateList &coordinates_ )
1843   : _coordinates(coordinates_)
1844 {
1845 }
1846 Magick::PathSmoothCurvetoRel::PathSmoothCurvetoRel
1847 ( const Magick::PathSmoothCurvetoRel& original_ )
1848   : VPathBase (original_),
1849     _coordinates(original_._coordinates)
1850 {
1851 }
1852 Magick::PathSmoothCurvetoRel::~PathSmoothCurvetoRel ( void )
1853 {
1854 }
1855 void Magick::PathSmoothCurvetoRel::operator()
1856   ( MagickCore::DrawingWand * context_ ) const
1857 {
1858   for( CoordinateList::const_iterator p = _coordinates.begin();
1859        p != _coordinates.end(); p++ )
1860     {
1861       double x2 = p->x();
1862       double y2 = p->y();
1863       p++;
1864       if(p != _coordinates.end() )
1865         DrawPathCurveToSmoothRelative( context_, x2, y2, p->x(), p->y() );
1866     }
1867 }
1868 Magick::VPathBase* Magick::PathSmoothCurvetoRel::copy() const
1869 {
1870   return new PathSmoothCurvetoRel(*this);
1871 }
1872
1873 //
1874 // Quadratic Curveto (Quadratic Bezier)
1875 //
1876 MagickPPExport int Magick::operator ==
1877 ( const Magick::PathQuadraticCurvetoArgs& /*left_*/,
1878   const Magick::PathQuadraticCurvetoArgs& /*right_*/ )
1879 {
1880   return ( 1 );
1881 }
1882 MagickPPExport int Magick::operator !=
1883 ( const Magick::PathQuadraticCurvetoArgs& /*left_*/,
1884   const Magick::PathQuadraticCurvetoArgs& /*right_*/ )
1885 {
1886   return ( 0 );
1887 }
1888 MagickPPExport int Magick::operator >
1889 ( const Magick::PathQuadraticCurvetoArgs& /*left_*/,
1890   const Magick::PathQuadraticCurvetoArgs& /*right_*/ )
1891 {
1892   return ( 0 );
1893 }
1894 MagickPPExport int Magick::operator < 
1895 ( const Magick::PathQuadraticCurvetoArgs& /*left_*/,
1896   const Magick::PathQuadraticCurvetoArgs& /*right_*/ )
1897 {
1898   return  ( 0 );
1899 }
1900 MagickPPExport int Magick::operator >=
1901 ( const Magick::PathQuadraticCurvetoArgs& left_,
1902   const Magick::PathQuadraticCurvetoArgs& right_ )
1903 {
1904   return ( ( left_ > right_ ) || ( left_ == right_ ) );
1905 }
1906 MagickPPExport int Magick::operator <=
1907 ( const Magick::PathQuadraticCurvetoArgs& left_,
1908   const Magick::PathQuadraticCurvetoArgs& right_ )
1909 {
1910   return ( ( left_ < right_ ) || ( left_ == right_ ) );
1911 }
1912 // Default Constructor
1913 Magick::PathQuadraticCurvetoArgs::PathQuadraticCurvetoArgs( void )
1914   : _x1(0),
1915     _y1(0),
1916     _x(0),
1917     _y(0)
1918 {
1919 }
1920 // Normal Constructor
1921 Magick::PathQuadraticCurvetoArgs::PathQuadraticCurvetoArgs( double x1_,
1922                                                             double y1_,
1923                                                             double x_,
1924                                                             double y_ )
1925   : _x1(x1_),
1926     _y1(y1_),
1927     _x(x_),
1928     _y(y_)
1929 {
1930 }
1931 // Copy Constructor
1932 Magick::PathQuadraticCurvetoArgs::PathQuadraticCurvetoArgs( const PathQuadraticCurvetoArgs &original_ )
1933   : _x1(original_._x1),
1934     _y1(original_._y1),
1935     _x(original_._x),
1936     _y(original_._y)
1937 {
1938 }
1939 // Destructor
1940 Magick::PathQuadraticCurvetoArgs::~PathQuadraticCurvetoArgs ( void )
1941 {
1942 }
1943
1944 Magick::PathQuadraticCurvetoAbs::PathQuadraticCurvetoAbs
1945 ( const Magick::PathQuadraticCurvetoArgs &args_ )
1946   : _args(1,args_)
1947 {
1948 }
1949 Magick::PathQuadraticCurvetoAbs::PathQuadraticCurvetoAbs 
1950 ( const PathQuadraticCurvetoArgsList &args_ )
1951   : _args(args_)
1952 {
1953 }
1954 Magick::PathQuadraticCurvetoAbs::PathQuadraticCurvetoAbs
1955 ( const Magick::PathQuadraticCurvetoAbs& original_ )
1956   : VPathBase (original_),
1957     _args(original_._args)
1958 {
1959 }
1960 Magick::PathQuadraticCurvetoAbs::~PathQuadraticCurvetoAbs ( void )
1961 {
1962 }
1963 void Magick::PathQuadraticCurvetoAbs::operator()
1964   ( MagickCore::DrawingWand * context_ ) const
1965 {
1966   for( PathQuadraticCurvetoArgsList::const_iterator p = _args.begin();
1967        p != _args.end(); p++ )
1968     {
1969       DrawPathCurveToQuadraticBezierAbsolute( context_, p->x1(), p->y1(),
1970                                               p->x(), p->y() );
1971     }
1972 }
1973 Magick::VPathBase* Magick::PathQuadraticCurvetoAbs::copy() const
1974 {
1975   return new PathQuadraticCurvetoAbs(*this);
1976 }
1977 Magick::PathQuadraticCurvetoRel::PathQuadraticCurvetoRel
1978 ( const Magick::PathQuadraticCurvetoArgs &args_ )
1979   : _args(1,args_)
1980 {
1981 }
1982 Magick::PathQuadraticCurvetoRel::PathQuadraticCurvetoRel
1983 ( const PathQuadraticCurvetoArgsList &args_ )
1984   : _args(args_)
1985 {
1986 }
1987 Magick::PathQuadraticCurvetoRel::PathQuadraticCurvetoRel
1988 ( const Magick::PathQuadraticCurvetoRel& original_ )
1989   : VPathBase (original_),
1990     _args(original_._args)
1991 {
1992 }
1993 Magick::PathQuadraticCurvetoRel::~PathQuadraticCurvetoRel ( void )
1994 {
1995 }
1996 void Magick::PathQuadraticCurvetoRel::operator()
1997   ( MagickCore::DrawingWand * context_ ) const
1998 {
1999   for( PathQuadraticCurvetoArgsList::const_iterator p = _args.begin();
2000        p != _args.end(); p++ )
2001     {
2002       DrawPathCurveToQuadraticBezierRelative( context_, p->x1(), p->y1(),
2003                                               p->x(), p->y() );
2004     }
2005 }
2006 Magick::VPathBase* Magick::PathQuadraticCurvetoRel::copy() const
2007 {
2008   return new PathQuadraticCurvetoRel(*this);
2009 }
2010 Magick::PathSmoothQuadraticCurvetoAbs::PathSmoothQuadraticCurvetoAbs
2011 ( const Magick::Coordinate &coordinate_ )
2012   : _coordinates(1,coordinate_)
2013 {
2014 }
2015 Magick::PathSmoothQuadraticCurvetoAbs::PathSmoothQuadraticCurvetoAbs
2016 ( const CoordinateList &coordinates_ )
2017   : _coordinates(coordinates_)
2018 {
2019 }
2020 Magick::PathSmoothQuadraticCurvetoAbs::PathSmoothQuadraticCurvetoAbs
2021 ( const Magick::PathSmoothQuadraticCurvetoAbs& original_ )
2022   : VPathBase (original_),
2023     _coordinates(original_._coordinates)
2024 {
2025 }
2026 Magick::PathSmoothQuadraticCurvetoAbs::~PathSmoothQuadraticCurvetoAbs ( void )
2027 {
2028 }
2029 void Magick::PathSmoothQuadraticCurvetoAbs::operator()
2030   ( MagickCore::DrawingWand * context_ ) const
2031 {
2032   for( CoordinateList::const_iterator p = _coordinates.begin();
2033        p != _coordinates.end(); p++ )
2034     {
2035       DrawPathCurveToQuadraticBezierSmoothAbsolute( context_, p->x(), p->y() );
2036     }
2037 }
2038 Magick::VPathBase* Magick::PathSmoothQuadraticCurvetoAbs::copy() const
2039 {
2040   return new PathSmoothQuadraticCurvetoAbs(*this);
2041 }
2042 Magick::PathSmoothQuadraticCurvetoRel::PathSmoothQuadraticCurvetoRel
2043 ( const Magick::Coordinate &coordinate_ )
2044   : _coordinates(1,coordinate_)
2045 {
2046 }
2047 Magick::PathSmoothQuadraticCurvetoRel::PathSmoothQuadraticCurvetoRel
2048 ( const CoordinateList &coordinates_ )
2049   : _coordinates(coordinates_)
2050 {
2051 }
2052 Magick::PathSmoothQuadraticCurvetoRel::PathSmoothQuadraticCurvetoRel
2053 ( const PathSmoothQuadraticCurvetoRel& original_ )
2054   : VPathBase (original_),
2055     _coordinates(original_._coordinates)
2056 {
2057 }
2058 Magick::PathSmoothQuadraticCurvetoRel::~PathSmoothQuadraticCurvetoRel ( void )
2059 {
2060 }
2061 void Magick::PathSmoothQuadraticCurvetoRel::operator()
2062   ( MagickCore::DrawingWand * context_ ) const
2063 {
2064   for( CoordinateList::const_iterator p = _coordinates.begin();
2065        p != _coordinates.end(); p++ )
2066     {
2067       DrawPathCurveToQuadraticBezierSmoothRelative( context_, p->x(), p->y() );
2068     }
2069 }
2070 Magick::VPathBase* Magick::PathSmoothQuadraticCurvetoRel::copy() const
2071 {
2072   return new PathSmoothQuadraticCurvetoRel(*this);
2073 }
2074
2075 //
2076 // Path Lineto
2077 //
2078 Magick::PathLinetoAbs::PathLinetoAbs ( const Magick::Coordinate& coordinate_  )
2079   : _coordinates(1,coordinate_)
2080 {
2081 }
2082 Magick::PathLinetoAbs::PathLinetoAbs ( const CoordinateList &coordinates_ )
2083   : _coordinates(coordinates_)
2084 {
2085 }
2086 Magick::PathLinetoAbs::PathLinetoAbs ( const Magick::PathLinetoAbs& original_ )
2087   : VPathBase (original_),
2088     _coordinates(original_._coordinates)
2089 {
2090 }
2091 Magick::PathLinetoAbs::~PathLinetoAbs ( void )
2092 {
2093 }
2094 void Magick::PathLinetoAbs::operator()( MagickCore::DrawingWand * context_ ) const
2095 {
2096   for( CoordinateList::const_iterator p = _coordinates.begin();
2097        p != _coordinates.end(); p++ )
2098     {
2099       DrawPathLineToAbsolute( context_, p->x(), p->y() );
2100     }
2101 }
2102 Magick::VPathBase* Magick::PathLinetoAbs::copy() const
2103 {
2104   return new PathLinetoAbs(*this);
2105 }
2106 Magick::PathLinetoRel::PathLinetoRel ( const Magick::Coordinate& coordinate_  )
2107   : _coordinates(1,coordinate_)
2108 {
2109 }
2110 Magick::PathLinetoRel::PathLinetoRel ( const CoordinateList &coordinates_ )
2111   : _coordinates(coordinates_)
2112 {
2113 }
2114 Magick::PathLinetoRel::PathLinetoRel ( const Magick::PathLinetoRel& original_ )
2115   : VPathBase (original_),
2116     _coordinates(original_._coordinates)
2117 {
2118 }
2119 Magick::PathLinetoRel::~PathLinetoRel ( void )
2120 {
2121 }
2122 void Magick::PathLinetoRel::operator()( MagickCore::DrawingWand * context_ ) const
2123 {
2124   for( CoordinateList::const_iterator p = _coordinates.begin();
2125        p != _coordinates.end(); p++ )
2126     {
2127       DrawPathLineToRelative( context_, p->x(), p->y() );
2128     }
2129 }
2130 Magick::VPathBase* Magick::PathLinetoRel::copy() const
2131 {
2132   return new PathLinetoRel(*this);
2133 }
2134
2135 //
2136 // Path Horizontal Lineto
2137 //
2138
2139 Magick::PathLinetoHorizontalAbs::~PathLinetoHorizontalAbs ( void )
2140 {
2141 }
2142 void Magick::PathLinetoHorizontalAbs::operator()
2143   ( MagickCore::DrawingWand * context_ ) const
2144 {
2145   DrawPathLineToHorizontalAbsolute( context_, _x );
2146 }
2147 Magick::VPathBase* Magick::PathLinetoHorizontalAbs::copy() const
2148 {
2149   return new PathLinetoHorizontalAbs(*this);
2150 }
2151 Magick::PathLinetoHorizontalRel::~PathLinetoHorizontalRel ( void )
2152 {
2153 }
2154 void Magick::PathLinetoHorizontalRel::operator()
2155   ( MagickCore::DrawingWand * context_ ) const
2156 {
2157   DrawPathLineToHorizontalRelative( context_, _x );
2158 }
2159 Magick::VPathBase* Magick::PathLinetoHorizontalRel::copy() const
2160 {
2161   return new PathLinetoHorizontalRel(*this);
2162 }
2163
2164 //
2165 // Path Vertical Lineto
2166 //
2167 Magick::PathLinetoVerticalAbs::~PathLinetoVerticalAbs ( void )
2168 {
2169 }
2170 void Magick::PathLinetoVerticalAbs::operator()
2171   ( MagickCore::DrawingWand * context_ ) const
2172 {
2173   DrawPathLineToVerticalAbsolute( context_, _y );
2174 }
2175 Magick::VPathBase* Magick::PathLinetoVerticalAbs::copy() const
2176 {
2177   return new PathLinetoVerticalAbs(*this);
2178 }
2179 Magick::PathLinetoVerticalRel::~PathLinetoVerticalRel ( void )
2180 {
2181 }
2182 void Magick::PathLinetoVerticalRel::operator()
2183   ( MagickCore::DrawingWand * context_ ) const
2184 {
2185   DrawPathLineToVerticalRelative( context_, _y );
2186 }
2187 Magick::VPathBase* Magick::PathLinetoVerticalRel::copy() const
2188 {
2189   return new PathLinetoVerticalRel(*this);
2190 }
2191
2192 //
2193 // Path Moveto
2194 //
2195
2196 Magick::PathMovetoAbs::PathMovetoAbs ( const Magick::Coordinate &coordinate_ )
2197   : _coordinates(1,coordinate_)
2198 {
2199 }
2200 Magick::PathMovetoAbs::PathMovetoAbs ( const CoordinateList &coordinates_ )
2201   : _coordinates(coordinates_)
2202 {
2203 }
2204 Magick::PathMovetoAbs::PathMovetoAbs ( const Magick::PathMovetoAbs& original_ )
2205   : VPathBase (original_),
2206     _coordinates(original_._coordinates)
2207 {
2208 }
2209 Magick::PathMovetoAbs::~PathMovetoAbs ( void )
2210 {
2211 }
2212 void Magick::PathMovetoAbs::operator()( MagickCore::DrawingWand * context_ ) const
2213 {
2214   for( CoordinateList::const_iterator p = _coordinates.begin();
2215        p != _coordinates.end(); p++ )
2216     {
2217       DrawPathMoveToAbsolute( context_, p->x(), p->y() );
2218     }
2219 }
2220 Magick::VPathBase* Magick::PathMovetoAbs::copy() const
2221 {
2222   return new PathMovetoAbs(*this);
2223 }
2224 Magick::PathMovetoRel::PathMovetoRel ( const Magick::Coordinate &coordinate_ )
2225   : _coordinates(1,coordinate_)
2226 {
2227 }
2228 Magick::PathMovetoRel::PathMovetoRel ( const CoordinateList &coordinates_ )
2229   : _coordinates(coordinates_)
2230 {
2231 }
2232 Magick::PathMovetoRel::PathMovetoRel ( const Magick::PathMovetoRel& original_ )
2233   : VPathBase (original_),
2234     _coordinates(original_._coordinates)
2235 {
2236 }
2237 Magick::PathMovetoRel::~PathMovetoRel ( void )
2238 {
2239 }
2240 void Magick::PathMovetoRel::operator()( MagickCore::DrawingWand * context_ ) const
2241 {
2242   for( CoordinateList::const_iterator p = _coordinates.begin();
2243        p != _coordinates.end(); p++ )
2244     {
2245       DrawPathMoveToRelative( context_, p->x(), p->y() );
2246     }
2247 }
2248 Magick::VPathBase* Magick::PathMovetoRel::copy() const
2249 {
2250   return new PathMovetoRel(*this);
2251 }
2252
2253 #if defined(EXPLICIT_TEMPLATE_INSTANTIATION)
2254 // template class std::vector<Magick::Coordinate>;
2255 // template class std::vector<const Magick::Drawable>;
2256 // template class std::vector<const Magick::PathArcArgs>;
2257 // template class std::vector<const Magick::PathCurvetoArgs>;
2258 // template class std::vector<const Magick::PathQuadraticCurvetoArgs>;
2259 // template class std::vector<const Magick::VPath>;
2260 #endif