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