Size
A 2D size with width and height.
Properties
aspect_ratio- Returns the aspect ratio (width / height).heightwidth
Methods
copy- Returns a copy of this object with the specified properties overridden.from_height- Creates aSizewith the given height and an infinite width.from_radius- Creates a squareSizewhose width and height are twice the given radius.from_width- Creates aSizewith the given width and an infinite height.infinite- Creates aSizewhose width and height are both positive infinity.is_finite- Checks if both dimensions are finite.is_infinite- Checks if either dimension is infinite.square- Creates a squareSizewhere width and height are the same.zero- Creates aSizewhose width and height are both0.0.
Properties
Methods
copy
Returns a copy of this object with the specified properties overridden.
from_radiusclassmethod
from_radius(cls, radius: Number)Creates a square Size whose width and
height are twice the given radius.