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 givenheightand an infinitewidth.from_radius- Creates a squareSizewhosewidthandheightare twice the given radius.from_width- Creates aSizewith the givenwidthand an infiniteheight.infinite- Creates aSizewhosewidthandheightare both positive infinity.is_finite- Checks if both dimensions are finite.is_infinite- Checks if either dimension is infinite.square- Creates a squareSizewherewidthandheightare the same.zero- Creates aSizewhosewidthandheightare 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.