Magick++ 6.9.13
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

Private Attributes

CoordinateList _coordinates

Detailed Description

Definition at line 1214 of file Drawable.h.

Constructor & Destructor Documentation

◆ DrawablePolygon() [1/2]

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

Definition at line 802 of file Drawable.cpp.

803 : _coordinates(coordinates_)
804{
805}

◆ DrawablePolygon() [2/2]

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

Definition at line 806 of file Drawable.cpp.

808 : DrawableBase (original_),
809 _coordinates(original_._coordinates)
810{
811}

◆ ~DrawablePolygon()

Magick::DrawablePolygon::~DrawablePolygon ( void )

Definition at line 812 of file Drawable.cpp.

813{
814}

Member Function Documentation

◆ copy()

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

Implements Magick::DrawableBase.

Definition at line 835 of file Drawable.cpp.

836{
837 return new DrawablePolygon(*this);
838}

◆ operator()()

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

Implements Magick::DrawableBase.

Definition at line 815 of file Drawable.cpp.

817{
818 size_t num_coords = (size_t) _coordinates.size();
819 PointInfo *coordinates = new PointInfo[num_coords];
820
821 PointInfo *q = coordinates;
822 CoordinateList::const_iterator p = _coordinates.begin();
823
824 while( p != _coordinates.end() )
825 {
826 q->x = p->x();
827 q->y = p->y();
828 q++;
829 p++;
830 }
831
832 DrawPolygon( context_, num_coords, coordinates );
833 delete [] coordinates;
834}

Member Data Documentation

◆ _coordinates

CoordinateList Magick::DrawablePolygon::_coordinates
private

Definition at line 1230 of file Drawable.h.


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