OpenASIP
2.0
|
#include <VertexList.hh>
Public Member Functions | |
VertexList () | |
~VertexList () | |
void | addVertex (int x, int y) |
size_t | size () const |
int | vertexX (size_t index) const |
int | vertexY (size_t index) const |
void | clear () |
Private Member Functions | |
VertexList (const VertexList &) | |
Copying forbidden. More... | |
VertexList & | operator= (const VertexList &) |
Assignment forbidden. More... | |
Private Attributes | |
std::vector< std::pair< int, int > > | vertices_ |
Vector containing vertices in the list. More... | |
VertexList is a class for storing x,y coordinate pairs in a list.
Definition at line 42 of file VertexList.hh.
VertexList::VertexList | ( | ) |
VertexList::~VertexList | ( | ) |
|
private |
Copying forbidden.
void VertexList::addVertex | ( | int | x, |
int | y | ||
) |
Adds a vertex to the list.
x | X-coordinate of the vertex. |
y | Y-coordinate of the vertex. |
Definition at line 57 of file VertexList.cc.
References vertices_.
Referenced by EPSDC::DoDrawPolygon().
void VertexList::clear | ( | ) |
Removes all vertices from the list.
Definition at line 118 of file VertexList.cc.
References vertices_.
|
private |
Assignment forbidden.
size_t VertexList::size | ( | ) | const |
Returns vertex count.
Definition at line 68 of file VertexList.cc.
References vertices_.
Referenced by EPSGenerator::drawFilledPolygon(), EPSGenerator::drawPolygon(), EPSGenerator::drawPolygonPath(), vertexX(), and vertexY().
int VertexList::vertexX | ( | size_t | index | ) | const |
Returns x-coordinate of a vertex with given index.
index | Index of the vertex. |
OutOfRange | If the index is out of range. |
Definition at line 80 of file VertexList.cc.
References size(), and vertices_.
Referenced by EPSGenerator::drawPolygonPath().
int VertexList::vertexY | ( | size_t | index | ) | const |
Returns y-coordinate of a vertex with given index.
index | Index of the vertex. |
OutOfRange | If the index is out of range. |
Definition at line 101 of file VertexList.cc.
References size(), and vertices_.
Referenced by EPSGenerator::drawPolygonPath().
|
private |
Vector containing vertices in the list.
Definition at line 59 of file VertexList.hh.
Referenced by addVertex(), clear(), size(), vertexX(), and vertexY().