scistag.shapestag.shape_list.ShapeList¶
- class ShapeList[source]¶
Bases:
ShapeInitializer
- Parameters
class_name – The class name
hashable_properties – The properties which can automatically get hashed by value to string conversion.
Methods
Draws the shape into the defined canvas
A unique hash of the data in this shape.
Renders the shape to an image.
Attributes
HASHABLE_PROPERTIES__annotations____dataclass_fields____dataclass_params____dict____doc____hash____module____weakref__list of weak references to the object (if defined)
The region to be covered overall
The shape's class
- get_hash()¶
A unique hash of the data in this shape. Is used to cache the shape’s renderings when it has not been modified.
- Return type
- Returns
The hash value
- to_image(background_color=Color(r=0.0, g=0.0, b=0.0, a=0.0, _rgba=(0.0, 0.0, 0.0, 0.0), _int_rgba=(0, 0, 0, 0)))¶
Renders the shape to an image.
The shape needs to either specify it’s bounding or it’s size as member variable to be convertible.
- Parameters
background_color – The background color
- Return type
- bounding: Bounding2D = Bounding2D(0.0,0.0,0.0,0.0)¶
The region to be covered overall