Bridges-Python  3.2.0
Bridges(PythonAPI)
Public Member Functions | List of all members
bridges.symbol.Symbol Class Reference
Inheritance diagram for bridges.symbol.Symbol:
bridges.circle.Circle bridges.label.Label bridges.polyline.Polyline bridges.rectangle.Rectangle 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...
 
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...
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.symbol.Symbol.__init__ (   self)

Constructor for a Symbol.

Member Function Documentation

◆ fill_color() [1/2]

def bridges.symbol.Symbol.fill_color (   self,
  Color 
)

Getter for the fill color.

Returns
Color the current fill color of this symbol

◆ fill_color() [2/2]

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

Setter for the fill color.

Parameters
colorthe color to set for the fill
Returns
None

◆ get_dimensions()

def bridges.symbol.Symbol.get_dimensions (   self,
  list 
)

Getter for the dimensions.

Returns
list the bounding box of this shape (xmin, xmax, ymin, ymax)

◆ get_json_representation()

def bridges.symbol.Symbol.get_json_representation (   self,
  dict 
)

Get the json representation of the Symbol class.

Returns
dict the JSON representation

◆ get_location()

def bridges.symbol.Symbol.get_location (   self,
  list 
)

Getter for the location of a symbol.

Returns
list the x and y coordinates of the shape's current location

◆ identifier()

def bridges.symbol.Symbol.identifier (   self,
  str 
)

Getter for the symbols identifier.

Returns
str

◆ label() [1/2]

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

Getter for symbol label.

Returns
str the label of this shape

◆ label() [2/2]

def bridges.symbol.Symbol.label (   self,
  label 
)

Setter for symbol label.

Parameters
labelto be set
Returns
str

◆ opacity() [1/2]

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

Getter for opacity.

Returns
float opacity of the shape

◆ opacity() [2/2]

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

Setter for opacity.

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

◆ rotate_point()

def bridges.symbol.Symbol.rotate_point (   self,
  pt,
  angle 
)

Rotate a point by 'angle' (2D rotation)

Parameters
pt2D point to be rotated
anglerotation angle

◆ scale_point()

def bridges.symbol.Symbol.scale_point (   self,
  pt,
  sx,
  sy 
)

Scale a point by sx, sy along X and Y respectively.

Parameters
pt2D point to be scaled
sxscale factor in X
syscale factor in Y

◆ set_location()

def bridges.symbol.Symbol.set_location (   self,
  x 
)

Setter for the location of the center of the symbol.

Parameters
xx location
yy location
Returns
None
       Value error

◆ shape_type() [1/2]

def bridges.symbol.Symbol.shape_type (   self)

Get the shape type (string)

Returns
shape name (string)

◆ shape_type() [2/2]

def bridges.symbol.Symbol.shape_type (   self,
  shape 
)

Set the shape type (string)

Parameters
shapeshape name to set

◆ stroke_color() [1/2]

def bridges.symbol.Symbol.stroke_color (   self,
  Color 
)

Getter for the stroke color.

Returns
the stroke (boundary) color of the shape

◆ stroke_color() [2/2]

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

Setter for the stroke color.

Parameters
colorthe stroke (boundary) color to set
Returns
None

◆ stroke_dash() [1/2]

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

Getter for stroke_dash.

Returns
float the stroke texture

◆ stroke_dash() [2/2]

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

Setter for stroke_dash.

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

◆ stroke_width() [1/2]

def bridges.symbol.Symbol.stroke_width (   self,
  float 
)

Getter for the stroke width.

Returns
float the stroke width of the shape

◆ stroke_width() [2/2]

def bridges.symbol.Symbol.stroke_width (   self,
  width 
)

Setter for the stroke width.

Parameters
widththe stroke width to set
Returns
None
       value error

◆ translate_point()

def bridges.symbol.Symbol.translate_point (   self,
  pt,
  tx,
  ty 
)

Translate a point by tx, ty along X and Y respectively.

Parameters
pt2D point to be translated
txtranslation factor in X
tytranslation factor in Y

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