Bridges-Python
3.4.4
Bridges(Python API)
|
This is the base class for constructing simple shapes in BRIDGES.
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.
Users will typically one of the subclasses of this object for creating shapes
Currently shapes supported are rectangle, circle, polygon, polyline and label; each shape has a name, location (x, y) and appropriate geometric and non-geometric attributes
Public Member Functions | |
def | __init__ (self) |
Constructor for a Symbol. More... | |
str | label (self) |
Getter for symbol label. More... | |
None | label (self, str label) |
Setter for symbol label. More... | |
def | get_shape_type (self) |
Color | fill_color (self) |
Getter for the fill color. More... | |
None | fill_color (self, *args, **kwargs) |
Setter for the fill color. More... | |
Color | stroke_color (self) |
Getter for the stroke color. More... | |
None | stroke_color (self, *args, **kwargs) |
Setter for the stroke color. More... | |
float | stroke_width (self) |
Getter for the stroke width. More... | |
None | stroke_width (self, float width) |
Setter for the stroke width. More... | |
float | opacity (self) |
Getter for opacity. More... | |
def | opacity (self, float o) |
Setter for opacity. More... | |
float | stroke_dash (self) |
Getter for stroke_dash. More... | |
def | stroke_dash (self, float dash) |
Setter for stroke_dash. More... | |
int | layer (self) |
def | layer (self, int l) |
def | xform (self) |
def | print_mat (self, list m) |
list | identity (self, list m) |
list | mat_mult (self, list m1, list m2) |
list | vec_mat_mult (self, list m, list v) |
def | translate (self, float tx, float ty) |
def | scale (self, *args) |
scale the symbol from a particular center location More... | |
def | rotate (self, *args) |
def | set_transform (self, float a, float b, float c, float d, float e, float f) |
dict | get_json_representation (self) |
Get the json representation of the Symbol class. More... | |
def | add_all_json (self, symbol_json, parent) |
def bridges.symbol.Symbol.__init__ | ( | self | ) |
Constructor for a Symbol.
Reimplemented in bridges.symbol_group.SymbolGroup.
def bridges.symbol.Symbol.add_all_json | ( | self, | |
symbol_json, | |||
parent | |||
) |
Reimplemented in bridges.symbol_group.SymbolGroup.
Color bridges.symbol.Symbol.fill_color | ( | self | ) |
Getter for the fill color.
None bridges.symbol.Symbol.fill_color | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Setter for the fill color.
color | the color to set for the fill |
dict bridges.symbol.Symbol.get_json_representation | ( | self | ) |
Get the json representation of the Symbol class.
Reimplemented in bridges.text.Text, bridges.rectangle.Rectangle, bridges.polyline.Polyline, and bridges.circle.Circle.
def bridges.symbol.Symbol.get_shape_type | ( | self | ) |
list bridges.symbol.Symbol.identity | ( | self, | |
list | m | ||
) |
str bridges.symbol.Symbol.label | ( | self | ) |
Getter for symbol label.
None bridges.symbol.Symbol.label | ( | self, | |
str | label | ||
) |
Setter for symbol label.
label | to be set |
int bridges.symbol.Symbol.layer | ( | self | ) |
def bridges.symbol.Symbol.layer | ( | self, | |
int | l | ||
) |
list bridges.symbol.Symbol.mat_mult | ( | self, | |
list | m1, | ||
list | m2 | ||
) |
float bridges.symbol.Symbol.opacity | ( | self | ) |
Getter for opacity.
def bridges.symbol.Symbol.opacity | ( | self, | |
float | o | ||
) |
Setter for opacity.
o | the opacity value to set (must be in 0-1.0 range) |
def bridges.symbol.Symbol.print_mat | ( | self, | |
list | m | ||
) |
def bridges.symbol.Symbol.rotate | ( | self, | |
* | args | ||
) |
def bridges.symbol.Symbol.scale | ( | self, | |
* | args | ||
) |
scale the symbol from a particular center location
if args is a single float, then scale both dimensions from the origin (what you want in 99% of cases) if args is two floats, scale x based on args[0] and y based on args[1] from the origin if args is four float, scale x based on args[0] and y based on args[1] from point args[2],args[3]
def bridges.symbol.Symbol.set_transform | ( | self, | |
float | a, | ||
float | b, | ||
float | c, | ||
float | d, | ||
float | e, | ||
float | f | ||
) |
Color bridges.symbol.Symbol.stroke_color | ( | self | ) |
Getter for the stroke color.
None bridges.symbol.Symbol.stroke_color | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Setter for the stroke color.
color | the stroke (boundary) color to set |
float bridges.symbol.Symbol.stroke_dash | ( | self | ) |
Getter for stroke_dash.
def bridges.symbol.Symbol.stroke_dash | ( | self, | |
float | dash | ||
) |
Setter for stroke_dash.
dash | the stroke_dash value to set (0-10 range) |
float bridges.symbol.Symbol.stroke_width | ( | self | ) |
Getter for the stroke width.
None bridges.symbol.Symbol.stroke_width | ( | self, | |
float | width | ||
) |
Setter for the stroke width.
width | the stroke width to set |
value error
def bridges.symbol.Symbol.translate | ( | self, | |
float | tx, | ||
float | ty | ||
) |
list bridges.symbol.Symbol.vec_mat_mult | ( | self, | |
list | m, | ||
list | v | ||
) |
def bridges.symbol.Symbol.xform | ( | self | ) |