![]() |
Bridges-Python-3.0.2
3.0.2
Bridges(PythonAPI)
|
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.
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 | |
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
def bridges.element_visualizer.ElementVisualizer.color | ( | self, | |
Color | |||
) |
Getter for the color of the element in the bridges visualization.
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
ValueError | if the color name provided is not available |
def bridges.element_visualizer.ElementVisualizer.location_x | ( | self | ) |
Getter for the X location of element.
def bridges.element_visualizer.ElementVisualizer.location_y | ( | self | ) |
Getter for the y location of the element.
def bridges.element_visualizer.ElementVisualizer.opacity | ( | self, | |
float | |||
) |
Getter for the opacity of the element.
def bridges.element_visualizer.ElementVisualizer.opacity | ( | self, | |
opacity, | |||
None | |||
) |
Setter for the opacity of the element.
(float) opacity: the opacity to be applied
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
def bridges.element_visualizer.ElementVisualizer.shape | ( | self, | |
str | |||
) |
Getter for the shape of the element.
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
def bridges.element_visualizer.ElementVisualizer.size | ( | self, | |
float | |||
) |
Getter for the elements size.
def bridges.element_visualizer.ElementVisualizer.size | ( | self, | |
size, | |||
None | |||
) |
Setter for the size of the element.
(float) size: the elements desired size
bridges.element_visualizer.ElementVisualizer.color |
bridges.element_visualizer.ElementVisualizer.prop |