geometry
Module#
Classes:
- class term_image.geometry.RawSize(width, height)[source]#
Bases:
NamedTuple
The dimensions of a rectangular region.
Note
A dimension may be non-positive but the validity and meaning would be determined by the receiving interface.
This is a subclass of
tuple
. Hence, instances can be used anyway and anywhere tuples can.
Attributes:
- class term_image.geometry.Size(width, height)[source]#
Bases:
RawSize
The dimensions of a rectangular region.
- Raises:
ValueError – Either dimension is non-positive.
Same as
RawSize
, except that both dimensions must be positive.Important
In the case of multiple inheritance i.e if subclassing this class along with other classes, this class should appear last (i.e to the far right) in the base class list.