scistag.imagestag.size2d.Size2D¶
- class Size2D(value=None, height=None, width=None)[source]¶
Bases:
objectDefines the size of a 2D element in pixels
- Parameters
value (Size2DTypes | float | None) – The initial width and height as tuple, a Size2D object
or the width. :type height: float | None :param height: The height :type width: float | None :param width: The width
Example:
- ``Size2D(50,100) == Size2D(width=50, height=100) == Size2D((50,100)) ==
Size2D(Size2D(50,100))``
Methods
Returns if the size is zero
Returns the size as int tuple
Returns the size as tuple
Attributes
__annotations____dataclass_fields____dataclass_params____dict____doc____hash____module____weakref__list of weak references to the object (if defined)
The width in pixels
The height in pixels