Bridges-C++  3.4.1
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  }
32 
37  Polygon (vector<float> pts) : Polyline (pts) {
38  }
39 
45  virtual string getShapeType() const override {
46  return "polygon";
47  }
48 
53  void setPolygon (vector<float> pts) {
54  this->setPolyline(pts);
55  }
56  };
57  }
58 } // namespace bridges
59 
60 #endif
This class defines a polygon and is part of the symbol collection. A polygon has a set of vertices,...
Definition: Polygon.h:24
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:53
Polygon()
default constructor
Definition: Polygon.h:30
virtual string getShapeType() const override
This method gets the type of the shape.
Definition: Polygon.h:45
Polygon(vector< float > pts)
constructor, given a set of points
Definition: Polygon.h:37