Bridges-C++
3.4.4
Bridges(C++ API)
|
#include <Symbol.h>
This is an abstract class for deriving a number of Symbol shape objects, for use in a SymbolCollection. Symbols correspond to a simplified subset of SVG paths and shapes for custom visual representations in BRIDGES.
Currently shapes supported are rectangle, circle, polygon, label; each shape has a name, location (x, y) and appropriate geometric and non-geometric attributes
Public Member Functions | |
Symbol () | |
default constructor More... | |
Symbol (const Symbol &s) | |
Symbol & | operator= (const Symbol &s) |
~Symbol () | |
virtual const string | getSymbolRepresentation () const =0 |
Virtual method to get the JSON representation of the symbol. More... | |
int | getIdentifier () const |
return the symbol identifier. More... | |
Symbol & | setFillColor (Color c) |
Set the symbol fill color. More... | |
Symbol & | setFillColor (string c) |
This method sets the symbol fill color. More... | |
Color | getFillColor () const |
This method gets fill color. More... | |
Symbol & | setStrokeColor (Color c) |
Symbol & | setStrokeColor (string c) |
This method sets the symbol stroke color. More... | |
Color | getStrokeColor () |
This method gets stroke color. More... | |
Symbol & | setStrokeWidth (float strk_width) |
This method sets the symbol stroke width. More... | |
float | getStrokeWidth () const |
This method gets stroke width. More... | |
Symbol & | setOpacity (float op) |
This method sets the symbol opacity. More... | |
float | getOpacity () const |
This method gets symbol opacity. More... | |
Symbol & | setStrokeDash (int dash) |
This method sets the stroke dash level. More... | |
int | getStrokeDash () const |
This method gets stroke dash level. More... | |
Symbol & | setLayer (int l) |
int | getLayer () const |
Symbol & | translate (float tx, float ty) |
Translate a 2D point. More... | |
Symbol & | scale (float sx, float sy) |
Scale a Symbol. More... | |
Symbol & | scale (float scalefactor) |
Scale a Symbol. More... | |
Symbol & | rotate (float angle) |
Rotate a 2D point (about Z) More... | |
Symbol & | scale (float sx, float sy, float px, float py) |
Scale about an arbitrary point (px, py) More... | |
Symbol & | rotate (float angle, float px, float py) |
Rotate a 2D point about an arbitrary point (px, py) More... | |
Symbol & | setTransform (float a, float b, float c, float d, float e, float f) |
Protected Member Functions | |
virtual string | getShapeType () const =0 |
const string | getSymbolAttributeRepresentation () const |
Get the JSON of the symbol representation. More... | |
|
inline |
default constructor
|
inline |
|
inline |
|
inline |
This method gets fill color.
|
inline |
return the symbol identifier.
Maintains unique identifiers of symbols and returns the Symbol's unique identifier
|
inline |
This method gets layer
|
inline |
This method gets symbol opacity.
|
protectedpure virtual |
Get the symbol type - implemented in subclasses
Implemented in bridges::datastructure::Text, and bridges::datastructure::SymbolGroup.
|
inline |
This method gets stroke color.
|
inline |
This method gets stroke dash level.
|
inline |
This method gets stroke width.
|
inlineprotected |
Get the JSON of the symbol representation.
This method gets the JSON representation of all of the symbol attributes
|
pure virtual |
Virtual method to get the JSON representation of the symbol.
Implemented in bridges::datastructure::Text, bridges::datastructure::SymbolGroup, bridges::datastructure::Rectangle, bridges::datastructure::Polyline, and bridges::datastructure::Circle.
|
inline |
Rotate a 2D point (about Z)
pt | 2D point (x, y) |
angle | rotation angle in degrees (positive is counter clockwise, negative is clockwise) |
|
inline |
Rotate a 2D point about an arbitrary point (px, py)
angle | rotation angle in degrees |
pt | 2D point (px, py) (positive is counter clockwise, negative is clockwise) |
|
inline |
Scale a Symbol.
pt | 2D point (x, y) |
scalefactor | scale factors along both axis |
|
inline |
Scale a Symbol.
pt | 2D point (x, y) |
sx,sy | scale factors along each axis |
|
inline |
Scale about an arbitrary point (px, py)
sx,scale | factors along X |
sy,scale | factors along X |
px | x coord of point |
py | y coord of point |
Set the symbol fill color.
c | the color to set |
|
inline |
This method sets the symbol fill color.
c | the named color to set |
|
inline |
This method sets the layer the symbol sits on
l | layer (lower value closer to camera) |
|
inline |
This method sets the symbol opacity.
op | the opacity to set |
This method sets the symbol stroke color
c | the color to set |
|
inline |
This method sets the symbol stroke color.
c | the named color to set |
|
inline |
This method sets the stroke dash level.
dash | dash level |
|
inline |
This method sets the symbol stroke width.
strk_width | the stroke width to set |
|
inline |
Directly sets the transform matrix; note that the parameters are provided in column major order
a,b,c,d,e,f | fills the first two rows of the matrix |
|
inline |
Translate a 2D point.
pt | 2D point (x, y) |
tx,ty | translation vector |