Bridges-C++  3.2.0
Bridges(C++API)
Polygon.h
Go to the documentation of this file.
1 #include "DataStructure.h"
2 #include "Polyline.h"
3 #include <vector>
4 
5 using namespace std;
6 
7 
8 #ifndef POLYGON_H
9 
10 #define POLYGON_H
11 
12 namespace bridges {
13  namespace datastructure {
24  class Polygon : public Polyline {
25 
26  public:
30  Polygon () : Polyline() {
31  setShapeType("polygon");
32  }
33 
38  Polygon (vector<float> pts) : Polyline (pts) {
39  setShapeType("polygon");
40  }
41 
47  virtual string getDataStructType() {
48  return "polygon";
49  }
50 
56  virtual string getName() const {
57  return "polygon";
58  }
59 
64  void setPolygon (vector<float> pts) {
65  this->setPolyline(pts);
66  setShapeType("polygon");
67  }
68  };
69  }
70 } // namespace bridges
71 
72 #endif
This class defines a polygon and is part of the symbol collection. A polygon has a set of vertices...
Definition: Polygon.h:24
STL namespace.
virtual string getName() const
This method gets the name of the shape.
Definition: Polygon.h:56
This class defines a polyline and is part of the symbol collection. A polyline has a set of vertices ...
Definition: Polyline.h:24
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4
void setPolygon(vector< float > pts)
constructs a polygon, given a set of points
Definition: Polygon.h:64
Polygon()
default constructor
Definition: Polygon.h:30
virtual string getDataStructType()
This method gets the name of the data type.
Definition: Polygon.h:47
Polygon(vector< float > pts)
constructor, given a set of points
Definition: Polygon.h:38