Bridges-C++  3.1.1
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. More...
 
void scale (float scale)
 
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
 

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.

Parameters
tx,tytranslation vector

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