![]() |
Bridges-C++
3.1.1
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 () | |
| virtual const string | getSymbolRepresentation () const =0 |
| virtual vector< float > | getDimensions () const =0 |
| 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 |
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 |
|
inline |
|
inline |
create a symbole of type "symb"
|
pure 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 |
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 |
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 |
This method sets 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 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 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