~ubuntu-branches/ubuntu/intrepid/graphicsmagick/intrepid

« back to all changes in this revision

Viewing changes to Magick++/lib/Magick++/Drawable.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2006-05-06 16:28:08 UTC
  • Revision ID: james.westby@ubuntu.com-20060506162808-vt2ni3r5nytcszms
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

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