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

#include <Rectangle.h>

Inheritance diagram for bridges::datastructure::Rectangle:
bridges::datastructure::Symbol

Detailed Description

This class defines a rectangle and is part of the symbol collection. A rectangle has height and width.

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

Public Member Functions

 Rectangle ()
 default constructor - rectangle with lower left at origin and unit length sides More...
 
 Rectangle (double w, double h)
 create rectangle with width w and height h More...
 
 Rectangle (double llx, double lly, double w, double h)
 create rectangle with width w and height h and located at given position More...
 
float getWidth ()
 This method gets the rectangle width. More...
 
void setWidth (double w)
 This method sets the shape width. More...
 
float getHeight ()
 This method gets the rectangle height. More...
 
void setHeight (double h)
 This method sets the shape height. More...
 
void setRectangle (double llx, double lly, double w, double h)
 
void setLL (double llx, double lly)
 
double getLLX () const
 
double getLLY () const
 
virtual const string getSymbolRepresentation () const override
 This method returns the JSON representation of the shape. More...
 
- Public Member Functions inherited from bridges::datastructure::Symbol
 Symbol ()
 default constructor More...
 
 Symbol (const Symbol &s)
 
Symboloperator= (const Symbol &s)
 
 ~Symbol ()
 
int getIdentifier () const
 return the symbol identifier. More...
 
SymbolsetFillColor (Color c)
 Set the symbol fill color. More...
 
SymbolsetFillColor (string c)
 This method sets the symbol fill color. More...
 
Color getFillColor () const
 This method gets fill color. More...
 
SymbolsetStrokeColor (Color c)
 
SymbolsetStrokeColor (string c)
 This method sets the symbol stroke color. More...
 
Color getStrokeColor ()
 This method gets stroke color. More...
 
SymbolsetStrokeWidth (float strk_width)
 This method sets the symbol stroke width. More...
 
float getStrokeWidth () const
 This method gets stroke width. More...
 
SymbolsetOpacity (float op)
 This method sets the symbol opacity. More...
 
float getOpacity () const
 This method gets symbol opacity. More...
 
SymbolsetStrokeDash (int dash)
 This method sets the stroke dash level. More...
 
int getStrokeDash () const
 This method gets stroke dash level. More...
 
SymbolsetLayer (int l)
 
int getLayer () const
 
Symboltranslate (float tx, float ty)
 Translate a 2D point. More...
 
Symbolscale (float sx, float sy)
 Scale a Symbol. More...
 
Symbolscale (float scalefactor)
 Scale a Symbol. More...
 
Symbolrotate (float angle)
 Rotate a 2D point (about Z) More...
 
Symbolscale (float sx, float sy, float px, float py)
 Scale about an arbitrary point (px, py) More...
 
Symbolrotate (float angle, float px, float py)
 Rotate a 2D point about an arbitrary point (px, py) More...
 
SymbolsetTransform (float a, float b, float c, float d, float e, float f)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Rectangle() [1/3]

bridges::datastructure::Rectangle::Rectangle ( )
inline

default constructor - rectangle with lower left at origin and unit length sides

◆ Rectangle() [2/3]

bridges::datastructure::Rectangle::Rectangle ( double  w,
double  h 
)
inline

create rectangle with width w and height h

Parameters
wwidth
hheight

◆ Rectangle() [3/3]

bridges::datastructure::Rectangle::Rectangle ( double  llx,
double  lly,
double  w,
double  h 
)
inline

create rectangle with width w and height h and located at given position

Parameters
locxrect lower left - x coord
locyrect lower left - y coord
wwidth
hheight

Member Function Documentation

◆ getHeight()

float bridges::datastructure::Rectangle::getHeight ( )
inline

This method gets the rectangle height.

Returns
height

◆ getLLX()

double bridges::datastructure::Rectangle::getLLX ( ) const
inline

◆ getLLY()

double bridges::datastructure::Rectangle::getLLY ( ) const
inline

◆ getSymbolRepresentation()

virtual const string bridges::datastructure::Rectangle::getSymbolRepresentation ( ) const
inlineoverridevirtual

This method returns the JSON representation of the shape.

Returns
string JSON string

Implements bridges::datastructure::Symbol.

◆ getWidth()

float bridges::datastructure::Rectangle::getWidth ( )
inline

This method gets the rectangle width.

Returns
width

◆ setHeight()

void bridges::datastructure::Rectangle::setHeight ( double  h)
inline

This method sets the shape height.

Parameters
hheight

◆ setLL()

void bridges::datastructure::Rectangle::setLL ( double  llx,
double  lly 
)
inline

◆ setRectangle()

void bridges::datastructure::Rectangle::setRectangle ( double  llx,
double  lly,
double  w,
double  h 
)
inline

◆ setWidth()

void bridges::datastructure::Rectangle::setWidth ( double  w)
inline

This method sets the shape width.

Parameters
wwidth

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