![]() |
Bridges-Python
3.2.0
Bridges(PythonAPI)
|
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... | |
| def | label (self) |
| Getter for symbol label. More... | |
| def | label |
| Setter for symbol label. More... | |
| def | identifier (self) |
| Getter for the symbols identifier. More... | |
| def | fill_color (self) |
| Getter for the fill color. More... | |
| def | fill_color (self, args, kwargs) |
| Setter for the fill color. More... | |
| def | stroke_color (self) |
| Getter for the stroke color. More... | |
| def | stroke_color (self, args, kwargs) |
| Setter for the stroke color. More... | |
| def | stroke_width (self) |
| Getter for the stroke width. More... | |
| def | stroke_width |
| Setter for the stroke width. More... | |
| def | opacity (self) |
| Getter for opacity. More... | |
| def | opacity |
| Setter for opacity. More... | |
| def | stroke_dash (self) |
| Getter for stroke_dash. More... | |
| def | stroke_dash |
| Setter for stroke_dash. More... | |
| def | shape_type (self) |
| Get the shape type (string) More... | |
| def | shape_type (self, shape) |
| Set the shape type (string) More... | |
| def | set_location |
| Setter for the location of the center of the symbol. More... | |
| def | get_location (self) |
| Getter for the location of a symbol. More... | |
| def | get_dimensions (self) |
| Getter for the dimensions. More... | |
| def | translate_point (self, pt, tx, ty) |
| Translate a point by tx, ty along X and Y respectively. More... | |
| def | scale_point (self, pt, sx, sy) |
| Scale a point by sx, sy along X and Y respectively. More... | |
| def | rotate_point (self, pt, angle) |
| Rotate a point by 'angle' (2D rotation) More... | |
| def | get_json_representation (self) |
| Get the json representation of the Symbol class. More... | |
| def bridges.symbol.Symbol.__init__ | ( | self | ) |
Constructor for a Symbol.
| def bridges.symbol.Symbol.fill_color | ( | self, | |
| Color | |||
| ) |
Getter for the fill color.
| def bridges.symbol.Symbol.fill_color | ( | self, | |
| args, | |||
| kwargs, | |||
| None | |||
| ) |
Setter for the fill color.
| color | the color to set for the fill |
| def bridges.symbol.Symbol.get_dimensions | ( | self, | |
| list | |||
| ) |
Getter for the dimensions.
| def bridges.symbol.Symbol.get_json_representation | ( | self, | |
| dict | |||
| ) |
Get the json representation of the Symbol class.
| def bridges.symbol.Symbol.get_location | ( | self, | |
| list | |||
| ) |
Getter for the location of a symbol.
| def bridges.symbol.Symbol.identifier | ( | self, | |
| str | |||
| ) |
Getter for the symbols identifier.
| def bridges.symbol.Symbol.label | ( | self, | |
| str | |||
| ) |
Getter for symbol label.
| def bridges.symbol.Symbol.label | ( | self, | |
| label | |||
| ) |
Setter for symbol label.
| label | to be set |
| def bridges.symbol.Symbol.opacity | ( | self, | |
| float | |||
| ) |
Getter for opacity.
| def bridges.symbol.Symbol.opacity | ( | self, | |
| o | |||
| ) |
Setter for opacity.
| o | the opacity value to set (must be in 0-1.0 range) |
| def bridges.symbol.Symbol.rotate_point | ( | self, | |
| pt, | |||
| angle | |||
| ) |
Rotate a point by 'angle' (2D rotation)
| pt | 2D point to be rotated |
| angle | rotation angle |
| def bridges.symbol.Symbol.scale_point | ( | self, | |
| pt, | |||
| sx, | |||
| sy | |||
| ) |
Scale a point by sx, sy along X and Y respectively.
| pt | 2D point to be scaled |
| sx | scale factor in X |
| sy | scale factor in Y |
| def bridges.symbol.Symbol.set_location | ( | self, | |
| x | |||
| ) |
Setter for the location of the center of the symbol.
| x | x location |
| y | y location |
Value error
| def bridges.symbol.Symbol.shape_type | ( | self | ) |
Get the shape type (string)
| def bridges.symbol.Symbol.shape_type | ( | self, | |
| shape | |||
| ) |
Set the shape type (string)
| shape | shape name to set |
| def bridges.symbol.Symbol.stroke_color | ( | self, | |
| Color | |||
| ) |
Getter for the stroke color.
| def bridges.symbol.Symbol.stroke_color | ( | self, | |
| args, | |||
| kwargs, | |||
| None | |||
| ) |
Setter for the stroke color.
| color | the stroke (boundary) color to set |
| def bridges.symbol.Symbol.stroke_dash | ( | self, | |
| float | |||
| ) |
Getter for stroke_dash.
| def bridges.symbol.Symbol.stroke_dash | ( | self, | |
| dash | |||
| ) |
Setter for stroke_dash.
| dash | the stroke_dash value to set (0-10 range) |
| def bridges.symbol.Symbol.stroke_width | ( | self, | |
| float | |||
| ) |
Getter for the stroke width.
| def bridges.symbol.Symbol.stroke_width | ( | self, | |
| width | |||
| ) |
Setter for the stroke width.
| width | the stroke width to set |
value error
| def bridges.symbol.Symbol.translate_point | ( | self, | |
| pt, | |||
| tx, | |||
| ty | |||
| ) |
Translate a point by tx, ty along X and Y respectively.
| pt | 2D point to be translated |
| tx | translation factor in X |
| ty | translation factor in Y |
1.8.13