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

#include <Circle.h>

Inheritance diagram for bridges::datastructure::Circle:
bridges::datastructure::Symbol

Detailed Description

This class defines a circle and is part of the symbol collection. A circle has a radius.

Author
Kalpathi Subramanian
Date
12/24/18, 7/12/19

Public Member Functions

 Circle ()
 
 Circle (int r)
 
 Circle (int locx, int locy, int r)
 
string getDataStructType ()
 
string getName () const
 
void setRadius (int r)
 This method sets the radius of the circle. More...
 
void setCircle (int locx, int locy, int r)
 This method sets the circle dimensions. More...
 
void translate (float tx, float ty)
 Translate the circle along X and Y dimensions. More...
 
void scale (float scale)
 
vector< float > getDimensions () const
 
const string getSymbolRepresentation () const
 
- Public Member Functions inherited from bridges::datastructure::Symbol
 Symbol ()
 default constructor More...
 
 Symbol (string symb)
 Create a symbol of type "symb". More...
 
int getIdentifier ()
 return the symbol identifier. More...
 
void setLabel (string lbl)
 Set the symbol label. More...
 
string getLabel () const
 Get the symbol label. More...
 
void setFillColor (Color c)
 Set the symbol fill color. More...
 
void setFillColor (string c)
 This method sets the symbol fill color. More...
 
Color getFillColor ()
 This method gets fill color. More...
 
void setStrokeColor (Color c)
 
void setStrokeColor (string c)
 This method sets the symbol stroke color. More...
 
Color getStrokeColor ()
 This method gets stroke color. More...
 
void setStrokeWidth (float strk_width)
 This method sets the symbol stroke width. More...
 
float getStrokeWidth ()
 This method gets stroke width. More...
 
void setOpacity (float op)
 This method sets the symbol opacity. More...
 
float getOpacity ()
 This method gets symbol opacity. More...
 
void setStrokeDash (int dash)
 This method sets the stroke dash level. More...
 
int getStrokeDash ()
 This method gets stroke dash level. More...
 
void setLocation (int x, int y)
 This method sets the symbol location. More...
 
void setLocation (double x, double y)
 This method sets the symbol location. More...
 
void setCenter (float x, float y)
 This method sets the symbol location. More...
 
void setLocation (float x, float y)
 This method sets the ssymbol location. More...
 
const float * getLocation () const
 This method gets the symbol location. More...
 
string getName () const
 This method gets the name of the symbol. More...
 

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
 Get the JSON of the symbol representation. More...
 

Constructor & Destructor Documentation

◆ Circle() [1/3]

bridges::datastructure::Circle::Circle ( )
inline

constructors

◆ Circle() [2/3]

bridges::datastructure::Circle::Circle ( int  r)
inline

Create a circle of radius r

Parameters
r: radius

◆ Circle() [3/3]

bridges::datastructure::Circle::Circle ( int  locx,
int  locy,
int  r 
)
inline

Create a circle with both location and radius

Parameters
locx,locy: center of circle
r: radius

Member Function Documentation

◆ getDataStructType()

string bridges::datastructure::Circle::getDataStructType ( )
inline

Get name of the data type

Returns
data type name

◆ getDimensions()

vector<float> bridges::datastructure::Circle::getDimensions ( ) const
inlinevirtual

This method returns the dimensions of the shape: min and max values in X and Y

Returns
array of 4 values

Implements bridges::datastructure::Symbol.

◆ getName()

string bridges::datastructure::Circle::getName ( ) const
inline

This method gets the name of the shape

Returns
name shape name

◆ getSymbolRepresentation()

const string bridges::datastructure::Circle::getSymbolRepresentation ( ) const
inlinevirtual

This method returns the JSON representation of the shape

Returns
string JSON string

Implements bridges::datastructure::Symbol.

◆ scale()

void bridges::datastructure::Circle::scale ( float  scale)
inline

Scale the circle Only the radius needs to be scaled, using a single scale value

Parameters
scalefactor s

◆ setCircle()

void bridges::datastructure::Circle::setCircle ( int  locx,
int  locy,
int  r 
)
inline

This method sets the circle dimensions.

Parameters
locxx coordinat of location
locyy coordinat of location
rradius

◆ setRadius()

void bridges::datastructure::Circle::setRadius ( int  r)
inline

This method sets the radius of the circle.

Parameters
rradius

◆ translate()

void bridges::datastructure::Circle::translate ( float  tx,
float  ty 
)
inline

Translate the circle along X and Y dimensions.

Parameters
tx,tytranslation vector

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