Bridges-Python-3.0.2  3.0.2
Bridges(PythonAPI)
Public Member Functions | Public Attributes | List of all members
bridges.element_visualizer.ElementVisualizer Class Reference

Detailed Description

This class is used to store the visualization elements on the for the bridges Visualization, including the color, shape, opacity, and size of the node.

Supported named colors: CSS colors. Check https://drafts.csswg.org/css-color-3/#svg-color:

Color by RGBA Specification : Range: 0-255 for each component

Thickness: Range : 0.0-50.0

Opacity: Range (0.0-1.0)

Supported Shapes: "circle", "square", "diamond", "cross", "triangle", "star", "wye".

Objects of this class are stored as properties of all Element subclasses. Generally, you will manipulating the ElementVisualizer returned from the Element getVisualizer() method, and then call the setVisualizer() method on the Element after changes have been made.

Author
Matthew Mcquaigue
Date
2018, 6/24/19

Public Member Functions

def __init__ (self, color="green", shape="circle", size=10.0, opacity=1.0)
 ElementVisualizer constuctor. More...
 
def size (self)
 Getter for the elements size. More...
 
def size (self, size)
 Setter for the size of the element. More...
 
def color (self)
 Getter for the color of the element in the bridges visualization. More...
 
def color (self, args, kwargs)
 Setter for the color of the element in the bridges visualization. More...
 
def shape (self)
 Getter for the shape of the element. More...
 
def shape (self, a_shape)
 Setter for the shape of the element. More...
 
def opacity (self)
 Getter for the opacity of the element. More...
 
def opacity (self, opacity)
 Setter for the opacity of the element. More...
 
def set_location (self, x, y)
 Setter for the location of the element. More...
 
def location_x (self)
 Getter for the X location of element. More...
 
def location_y (self)
 Getter for the y location of the element. More...
 

Public Attributes

 prop
 
 color
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.element_visualizer.ElementVisualizer.__init__ (   self,
  color = "green",
  shape = "circle",
  size = 10.0,
  opacity = 1.0 
)

ElementVisualizer constuctor.

(str) color: color for this element (str) shape: the shape of the element (float) size: the element size (float) opacity: the element opacity

Returns
None

Member Function Documentation

◆ color() [1/2]

def bridges.element_visualizer.ElementVisualizer.color (   self,
  Color 
)

Getter for the color of the element in the bridges visualization.

Returns
Color Color object representing the color of the element

◆ color() [2/2]

def bridges.element_visualizer.ElementVisualizer.color (   self,
  args,
  kwargs,
  None 
)

Setter for the color of the element in the bridges visualization.

(optional) list: requires either 3 ints 0-255 for RGB and an optional float 0.0-1.0 for alpha EX: color = [0, 255, 0, 1.0] (optional) str: string representing the element color. from web colors: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value

Returns
None
Exceptions
ValueErrorif the color name provided is not available

◆ location_x()

def bridges.element_visualizer.ElementVisualizer.location_x (   self)

Getter for the X location of element.

Returns
int as the x location

◆ location_y()

def bridges.element_visualizer.ElementVisualizer.location_y (   self)

Getter for the y location of the element.

Returns
int as the y position

◆ opacity() [1/2]

def bridges.element_visualizer.ElementVisualizer.opacity (   self,
  float 
)

Getter for the opacity of the element.

Returns
float representing the opacity

◆ opacity() [2/2]

def bridges.element_visualizer.ElementVisualizer.opacity (   self,
  opacity,
  None 
)

Setter for the opacity of the element.

(float) opacity: the opacity to be applied

Returns
None

◆ set_location()

def bridges.element_visualizer.ElementVisualizer.set_location (   self,
  x,
  y 
)

Setter for the location of the element.

(int) x: x location (int) y: y location

Returns
None

◆ shape() [1/2]

def bridges.element_visualizer.ElementVisualizer.shape (   self,
  str 
)

Getter for the shape of the element.

Returns
str reperesenting the type of shape

◆ shape() [2/2]

def bridges.element_visualizer.ElementVisualizer.shape (   self,
  a_shape 
)

Setter for the shape of the element.

(str) a_shape: the name of shape for element

◆ size() [1/2]

def bridges.element_visualizer.ElementVisualizer.size (   self,
  float 
)

Getter for the elements size.

Returns
float the size

◆ size() [2/2]

def bridges.element_visualizer.ElementVisualizer.size (   self,
  size,
  None 
)

Setter for the size of the element.

(float) size: the elements desired size

Returns
None

Member Data Documentation

◆ color

bridges.element_visualizer.ElementVisualizer.color

◆ prop

bridges.element_visualizer.ElementVisualizer.prop

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