Bridges-Python  3.4.3
Bridges(Python API)
Public Member Functions | List of all members
bridges.symbol.Symbol Class Reference
Inheritance diagram for bridges.symbol.Symbol:
bridges.circle.Circle bridges.polyline.Polyline bridges.rectangle.Rectangle bridges.symbol_group.SymbolGroup bridges.text.Text bridges.polygon.Polygon

Detailed Description

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

Author
David Burlinson, Kalpathi Subramanian
Date
12/24/18, 7/12/19

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)
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.symbol.Symbol.__init__ (   self)

Constructor for a Symbol.

Reimplemented in bridges.symbol_group.SymbolGroup.

Member Function Documentation

◆ add_all_json()

def bridges.symbol.Symbol.add_all_json (   self,
  symbol_json,
  parent 
)

◆ fill_color() [1/2]

Color bridges.symbol.Symbol.fill_color (   self)

Getter for the fill color.

Returns
Color the current fill color of this symbol

◆ fill_color() [2/2]

None bridges.symbol.Symbol.fill_color (   self,
args,
**  kwargs 
)

Setter for the fill color.

Parameters
colorthe color to set for the fill
Returns
None

◆ get_json_representation()

dict bridges.symbol.Symbol.get_json_representation (   self)

Get the json representation of the Symbol class.

Returns
dict the JSON representation

Reimplemented in bridges.text.Text, bridges.rectangle.Rectangle, bridges.polyline.Polyline, and bridges.circle.Circle.

◆ get_shape_type()

def bridges.symbol.Symbol.get_shape_type (   self)

◆ identity()

list bridges.symbol.Symbol.identity (   self,
list  m 
)

◆ label() [1/2]

str bridges.symbol.Symbol.label (   self)

Getter for symbol label.

Returns
str the label of this shape

◆ label() [2/2]

None bridges.symbol.Symbol.label (   self,
str  label 
)

Setter for symbol label.

Parameters
labelto be set
Returns
str

◆ layer() [1/2]

int bridges.symbol.Symbol.layer (   self)

◆ layer() [2/2]

def bridges.symbol.Symbol.layer (   self,
int  l 
)

◆ mat_mult()

list bridges.symbol.Symbol.mat_mult (   self,
list  m1,
list  m2 
)

◆ opacity() [1/2]

float bridges.symbol.Symbol.opacity (   self)

Getter for opacity.

Returns
float opacity of the shape

◆ opacity() [2/2]

def bridges.symbol.Symbol.opacity (   self,
float  o 
)

Setter for opacity.

Parameters
othe opacity value to set (must be in 0-1.0 range)
Returns
None
Raises value error

◆ print_mat()

def bridges.symbol.Symbol.print_mat (   self,
list  m 
)

◆ rotate()

def bridges.symbol.Symbol.rotate (   self,
args 
)

◆ scale()

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]

◆ set_transform()

def bridges.symbol.Symbol.set_transform (   self,
float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
)

◆ stroke_color() [1/2]

Color bridges.symbol.Symbol.stroke_color (   self)

Getter for the stroke color.

Returns
the stroke (boundary) color of the shape

◆ stroke_color() [2/2]

None bridges.symbol.Symbol.stroke_color (   self,
args,
**  kwargs 
)

Setter for the stroke color.

Parameters
colorthe stroke (boundary) color to set
Returns
None

◆ stroke_dash() [1/2]

float bridges.symbol.Symbol.stroke_dash (   self)

Getter for stroke_dash.

Returns
float the stroke texture

◆ stroke_dash() [2/2]

def bridges.symbol.Symbol.stroke_dash (   self,
float  dash 
)

Setter for stroke_dash.

Parameters
dashthe stroke_dash value to set (0-10 range)
Returns
None
Raises value error

◆ stroke_width() [1/2]

float bridges.symbol.Symbol.stroke_width (   self)

Getter for the stroke width.

Returns
float the stroke width of the shape

◆ stroke_width() [2/2]

None bridges.symbol.Symbol.stroke_width (   self,
float  width 
)

Setter for the stroke width.

Parameters
widththe stroke width to set
Returns
None
       value error

◆ translate()

def bridges.symbol.Symbol.translate (   self,
float  tx,
float  ty 
)

◆ vec_mat_mult()

list bridges.symbol.Symbol.vec_mat_mult (   self,
list  m,
list  v 
)

◆ xform()

def bridges.symbol.Symbol.xform (   self)

The documentation for this class was generated from the following file: