Bridges-C++  3.1.1
Bridges(C++API)
Public Member Functions | List of all members
bridges::datastructure::Polygon Class Reference

#include <Polygon.h>

Inheritance diagram for bridges::datastructure::Polygon:
bridges::datastructure::Polyline bridges::datastructure::Symbol

Detailed Description

This class defines a polygon and is part of the symbol collection. A polygon has a set of vertices, with vertices connected by line segments. It differs from the polyline in the sense that the last and first vertex are connect to close the shape.

Author
David Burlinson, Kalpathi Subramanian
Date
12/23/18, 7/12/19

Public Member Functions

 Polygon ()
 
 Polygon (vector< float > pts)
 
virtual string getDataStructType ()
 
virtual string getName () const
 
void setPolygon (vector< float > pts)
 
- Public Member Functions inherited from bridges::datastructure::Polyline
 Polyline ()
 
 Polyline (vector< float > pts)
 
string getDataStructType ()
 
string getName () const
 
void addPoint (float x, float y)
 
vector< float > getPoints ()
 
void setPolyline (vector< float > pts)
 
void translate (float tx, float ty)
 Translate the polyline. More...
 
void rotate (float angle)
 rotate the polyline about its center l * More...
 
void scale (float sx, float sy)
 Scale the polyline about its center. More...
 
void getCenter (float *center)
 
vector< float > getDimensions () const
 
const string getSymbolRepresentation () const
 
- Public Member Functions inherited from bridges::datastructure::Symbol
 Symbol ()
 
 Symbol (string symb)
 
int getIdentifier ()
 
void setLabel (string lbl)
 
string getLabel () const
 
void setFillColor (Color c)
 
void setFillColor (string c)
 
Color getFillColor ()
 
void setStrokeColor (Color c)
 
void setStrokeColor (string c)
 
Color getStrokeColor ()
 
void setStrokeWidth (float strk_width)
 
float getStrokeWidth ()
 
void setOpacity (float op)
 
float getOpacity ()
 
void setStrokeDash (int dash)
 
int getStrokeDash ()
 
void setLocation (int x, int y)
 
void setCenter (float x, float y)
 
void setLocation (float x, float y)
 
const float * getLocation () const
 
string getName () const
 

Additional Inherited Members

- Protected Member Functions inherited from bridges::datastructure::Symbol
void setShapeType (string s)
 Set the shape type. More...
 
string getShapeType () const
 
void translatePoint (float *pt, float tx, float ty)
 Translate a 2D point. More...
 
void scalePoint (float *pt, float sx, float sy)
 Scale a 2D point. More...
 
void rotatePoint (float *pt, float angle)
 Rotate a 2D point (about Z) More...
 
const string getSymbolAttributeRepresentation () const
 
- Protected Attributes inherited from bridges::datastructure::Polyline
vector< float > points
 

Constructor & Destructor Documentation

◆ Polygon() [1/2]

bridges::datastructure::Polygon::Polygon ( )
inline

◆ Polygon() [2/2]

bridges::datastructure::Polygon::Polygon ( vector< float >  pts)
inline

Member Function Documentation

◆ getDataStructType()

virtual string bridges::datastructure::Polygon::getDataStructType ( )
inlinevirtual

This method gets the name of the data type

Returns
name data type

◆ getName()

virtual string bridges::datastructure::Polygon::getName ( ) const
inlinevirtual

This method gets the name of the shape

Returns
name shape name

◆ setPolygon()

void bridges::datastructure::Polygon::setPolygon ( vector< float >  pts)
inline

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