![]() |
Bridges-C++
3.1.1
Bridges(C++API)
|
#include <Rectangle.h>
This class defines a rectangle and is part of the symbol collection. A rectangle has height and width.
Public Member Functions | |
| Rectangle () | |
| Rectangle (int w, int h) | |
| Rectangle (float locx, float locy, float w, float h) | |
| string | getDataStructType () |
| string | getName () const |
| void | setWidth (float w) |
| void | setHeight (float h) |
| void | translate (float tx, float ty) |
| void | scale (float sx, float sy) |
| vector< float > | getDimensions () const |
| void | setRectangle (float locx, float locy, float w, float h) |
| virtual 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 |
|
inline |
constructors
|
inline |
create rectangle with width w and height h
| w | width |
| h | height |
|
inline |
create rectangle with width w and height h
| locx | rect lower left - x coord |
| locy | rect lower left - y coord |
| w | width |
| h | height |
|
inline |
This method gets the data type name
|
inlinevirtual |
This method returns the dimensions of the shape: min and max values in X and Y
Implements bridges::datastructure::Symbol.
|
inline |
This method gets the name of the shape
|
inlinevirtual |
This method returns the JSON representation of the shape
Implements bridges::datastructure::Symbol.
|
inline |
Scale the rectangle about its center
| sx | scale factor along x axis |
| sy | scale factor along y axis |
|
inline |
This method sets the shape height
| h | height |
|
inline |
|
inline |
This method sets the shape width
| w | width |
|
inline |
Translate the rectangle
| tx | translation factor along x axis |
| ty | translation factor along y axis |
1.8.13