Magick++ 7.1.1
Loading...
Searching...
No Matches
Magick::DrawablePolygon Class Reference
Inheritance diagram for Magick::DrawablePolygon:
Collaboration diagram for Magick::DrawablePolygon:

Public Member Functions

 DrawablePolygon (const CoordinateList &coordinates_)
 
 DrawablePolygon (const DrawablePolygon &original_)
 
void operator() (MagickCore::DrawingWand *context_) const
 
DrawableBasecopy () const
 
virtual void operator() (MagickCore::DrawingWand *) const
 
virtual DrawableBasecopy () const
 

Private Attributes

CoordinateList _coordinates
 

Detailed Description

Definition at line 1273 of file Drawable.h.

Constructor & Destructor Documentation

◆ DrawablePolygon() [1/2]

Magick::DrawablePolygon::DrawablePolygon ( const CoordinateList &  coordinates_)

Definition at line 921 of file Drawable.cpp.

922 : _coordinates(coordinates_)
923{
924}

◆ DrawablePolygon() [2/2]

Magick::DrawablePolygon::DrawablePolygon ( const DrawablePolygon original_)

Definition at line 925 of file Drawable.cpp.

927 : DrawableBase (original_),
928 _coordinates(original_._coordinates)
929{
930}

◆ ~DrawablePolygon()

Magick::DrawablePolygon::~DrawablePolygon ( void  )

Definition at line 931 of file Drawable.cpp.

932{
933}

Member Function Documentation

◆ copy()

Magick::DrawableBase * Magick::DrawablePolygon::copy ( ) const
virtual

Reimplemented from Magick::DrawableBase.

Definition at line 954 of file Drawable.cpp.

955{
956 return new DrawablePolygon(*this);
957}

◆ operator()()

void Magick::DrawablePolygon::operator() ( MagickCore::DrawingWand *  context_) const
virtual

Reimplemented from Magick::DrawableBase.

Definition at line 934 of file Drawable.cpp.

936{
937 size_t num_coords = (size_t) _coordinates.size();
938 PointInfo *coordinates = new PointInfo[num_coords];
939
940 PointInfo *q = coordinates;
941 CoordinateList::const_iterator p = _coordinates.begin();
942
943 while( p != _coordinates.end() )
944 {
945 q->x = p->x();
946 q->y = p->y();
947 q++;
948 p++;
949 }
950
951 DrawPolygon( context_, num_coords, coordinates );
952 delete [] coordinates;
953}

Member Data Documentation

◆ _coordinates

CoordinateList Magick::DrawablePolygon::_coordinates
private

Definition at line 1289 of file Drawable.h.


The documentation for this class was generated from the following files: