Bridges-C++ 3.5.1
Bridges(C++ API)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
bridges::datastructure::Polyline Class Reference

This class defines a polyline and is part of the symbol collection. A polyline has a set of vertices with the vertices connect by line segments. More...

#include <Polyline.h>

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

Public Member Functions

 Polyline ()
 default constructor
 
 Polyline (vector< float > pts)
 Construct a polyline from sequence of points.
 
void addPoint (float x, float y)
 This method adds a point to the polyline.
 
vector< float > getPoints ()
 This method returns the point list of the polyline.
 
void setPolyline (vector< float > pts)
 Construct a polyline from sequence of points.
 
void getCenter (float *center)
 Get center of polyline - use its bounding box.
 
const string getSymbolRepresentation () const override
 This method returns the JSON representation of the shape.
 
- Public Member Functions inherited from bridges::datastructure::Symbol
 Symbol ()
 default constructor
 
 Symbol (const Symbol &s)
 
Symbol & operator= (const Symbol &s)
 
 ~Symbol ()
 
int getIdentifier () const
 return the symbol identifier.
 
Symbol & setFillColor (Color c)
 Set the symbol fill color.
 
Symbol & setFillColor (string c)
 This method sets the symbol fill color.
 
Color getFillColor () const
 This method gets fill color.
 
Symbol & setStrokeColor (Color c)
 
Symbol & setStrokeColor (string c)
 This method sets the symbol stroke color.
 
Color getStrokeColor ()
 This method gets stroke color.
 
Symbol & setStrokeWidth (float strk_width)
 This method sets the symbol stroke width.
 
float getStrokeWidth () const
 This method gets stroke width.
 
Symbol & setOpacity (float op)
 This method sets the symbol opacity.
 
float getOpacity () const
 This method gets symbol opacity.
 
Symbol & setStrokeDash (int dash)
 This method sets the stroke dash level.
 
int getStrokeDash () const
 This method gets stroke dash level.
 
Symbol & setLayer (int l)
 
int getLayer () const
 
Symbol & translate (float tx, float ty)
 Translate by a vector.
 
Symbol & scale (float sx, float sy)
 Scale a Symbol.
 
Symbol & scale (float scalefactor)
 Scale a Symbol.
 
Symbol & rotate (float angle)
 Rotate a 2D point (about Z)
 
Symbol & scale (float sx, float sy, float px, float py)
 Scale about an arbitrary point (px, py)
 
Symbol & rotate (float angle, float px, float py)
 Rotate a 2D point about an arbitrary point (px, py)
 
Symbol & setTransform (float a, float b, float c, float d, float e, float f)
 

Protected Attributes

vector< float > points
 

Additional Inherited Members

- Protected Member Functions inherited from bridges::datastructure::Symbol
const string getSymbolAttributeRepresentation () const
 Get the JSON of the symbol representation.
 

Detailed Description

This class defines a polyline and is part of the symbol collection. A polyline has a set of vertices with the vertices connect by line segments.

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

Constructor & Destructor Documentation

◆ Polyline() [1/2]

bridges::datastructure::Polyline::Polyline ( )
inline

default constructor

◆ Polyline() [2/2]

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

Construct a polyline from sequence of points.

Parameters
ptspoint sequence

Member Function Documentation

◆ addPoint()

void bridges::datastructure::Polyline::addPoint ( float  x,
float  y 
)
inline

This method adds a point to the polyline.

Parameters
x,y: X, Y coordinates of the point

◆ getCenter()

void bridges::datastructure::Polyline::getCenter ( float *  center)
inline

Get center of polyline - use its bounding box.

Parameters
[out]centerof the polyline to be returned

◆ getPoints()

vector< float > bridges::datastructure::Polyline::getPoints ( )
inline

This method returns the point list of the polyline.

Returns
points point list of the polygon - sequence of x, y values

◆ getSymbolRepresentation()

const string bridges::datastructure::Polyline::getSymbolRepresentation ( ) const
inlineoverridevirtual

This method returns the JSON representation of the shape.

Returns
string JSON string

Implements bridges::datastructure::Symbol.

◆ setPolyline()

void bridges::datastructure::Polyline::setPolyline ( vector< float >  pts)
inline

Construct a polyline from sequence of points.

Parameters
ptspoint sequence

Member Data Documentation

◆ points

vector<float> bridges::datastructure::Polyline::points
protected

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