![]() |
Bridges-Python 3.5.1
Bridges(Python API)
|
This is the base class for constructing simple shapes in BRIDGES. More...
Public Member Functions | |
| __init__ (self) | |
| Constructor for a Symbol. | |
| get_shape_type (self) | |
| print_mat (self, list m) | |
| print the current matrix for debugging | |
| list | identity (self, list m) |
| create the identity matrix | |
| list | mat_mult (self, list m1, list m2) |
| list | vec_mat_mult (self, list m, list v) |
| translate (self, float tx, float ty) | |
| scale (self, *args) | |
| scale the symbol from a particular center location | |
| rotate (self, *args) | |
| 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. | |
| add_all_json (self, symbol_json, parent) | |
Protected Attributes | |
| _label | |
| _fill_color | |
| _stroke_color | |
| _opacity | |
| _stroke_width | |
| _stroke_dash | |
| _layer | |
| _transform | |
| _xform | |
| _xform_flag | |
Properties | |
| label = property | |
| Getter for symbol label. | |
| fill_color = property | |
| Getter for the fill color. | |
| stroke_color = property | |
| Getter for the stroke color. | |
| stroke_width = property | |
| Getter for the stroke width. | |
| opacity = property | |
| Getter for opacity. | |
| stroke_dash = property | |
| Getter for stroke_dash. | |
| layer = property | |
| xform = property | |
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
| bridges.symbol.Symbol.__init__ | ( | self | ) |
Constructor for a Symbol.
Reimplemented in bridges.symbol_group.SymbolGroup, bridges.circle.Circle, bridges.rectangle.Rectangle, bridges.text.Text, bridges.polygon.Polygon, and bridges.polyline.Polyline.
| bridges.symbol.Symbol.add_all_json | ( | self, | |
| symbol_json, | |||
| parent | |||
| ) |
Reimplemented in bridges.symbol_group.SymbolGroup.
| dict bridges.symbol.Symbol.get_json_representation | ( | self | ) |
Get the json representation of the Symbol class.
Reimplemented in bridges.circle.Circle, bridges.polyline.Polyline, bridges.rectangle.Rectangle, and bridges.text.Text.
| bridges.symbol.Symbol.get_shape_type | ( | self | ) |
| list bridges.symbol.Symbol.identity | ( | self, | |
| list | m | ||
| ) |
create the identity matrix
| m | is a 3x3 input matrix as a 2d list |
| list bridges.symbol.Symbol.mat_mult | ( | self, | |
| list | m1, | ||
| list | m2 | ||
| ) |
| bridges.symbol.Symbol.print_mat | ( | self, | |
| list | m | ||
| ) |
print the current matrix for debugging
| m | 3x3 matrix as 2d list to be printed |
| bridges.symbol.Symbol.rotate | ( | self, | |
| * | args | ||
| ) |
| 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]
| bridges.symbol.Symbol.set_transform | ( | self, | |
| float | a, | ||
| float | b, | ||
| float | c, | ||
| float | d, | ||
| float | e, | ||
| float | f | ||
| ) |
| bridges.symbol.Symbol.translate | ( | self, | |
| float | tx, | ||
| float | ty | ||
| ) |
| list bridges.symbol.Symbol.vec_mat_mult | ( | self, | |
| list | m, | ||
| list | v | ||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Getter for the fill color.
|
static |
Getter for symbol label.
|
static |
|
static |
Getter for opacity.
|
static |
Getter for the stroke color.
|
static |
Getter for stroke_dash.
|
static |
Getter for the stroke width.
|
static |