![]() |
Bridges-C++
3.2.0
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... | |
| virtual const string | getSymbolRepresentation () const =0 |
| Virtual method to get the JSON representation of the symbol. More... | |
| virtual vector< float > | getDimensions () const =0 |
| Virtual method to get the bounding box (dimensions) of the shape. 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... | |
Protected Member Functions | |
| 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... | |
|
inline |
default constructor
|
inline |
Create a symbol of type "symb".
| symb | symbol to create |
|
pure virtual |
Virtual method to get the bounding box (dimensions) of the shape.
Implemented in bridges::datastructure::Polyline, bridges::datastructure::Label, bridges::datastructure::Rectangle, and bridges::datastructure::Circle.
|
inline |
This method gets fill color.
|
inline |
return the symbol identifier.
Maintains unique identifiers of symbols and returns the Symbol's unique identifier
|
inline |
Get the symbol label.
|
inline |
This method gets the symbol location.
|
inline |
This method gets the name of the symbol.
|
inline |
This method gets symbol opacity.
|
inlineprotected |
Get the symbol label
|
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::Polyline, bridges::datastructure::Rectangle, bridges::datastructure::Label, and bridges::datastructure::Circle.
|
inlineprotected |
Rotate a 2D point (about Z)
| pt | 2D point (x, y) |
| angle | rotation angle in degrees (positive is counter clockwise, negative is clockwise) |
|
inlineprotected |
Scale a 2D point.
| pt | 2D point (x, y) |
| sx,sy | scale factors along each axis |
|
inline |
This method sets the symbol location.
| x | x coordinate |
| y | y coordinate |
|
inline |
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 |
Set the symbol label.
| lbl | the label to set |
|
inline |
This method sets the symbol location.
| x | x coordinate |
| y | y coordinate |
|
inline |
This method sets the symbol location.
| x | x coordinate |
| y | y coordinate |
|
inline |
This method sets the ssymbol location.
| x | x coordinate |
| y | y coordinate |
|
inline |
This method sets the symbol opacity.
| op | the opacity to set |
|
inlineprotected |
Set the shape type.
| s | shape type to set |
|
inline |
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 |
|
inlineprotected |
Translate a 2D point.
| pt | 2D point (x, y) |
| tx,ty | translation vector |
1.8.13