Size class

Size class

Stores an ordered pair of integers, which specify a width and a height. Compatible with .NET System.Drawing.Size.

The Size type exposes the following members:

Constructors

ConstructorDescription
__init__(self, width=0, height=0)Creates a size with the specified width and height. Float values are truncated to integers.

Properties

PropertyDescription
widthGets the horizontal component of this size.
Read-only int.
heightGets the vertical component of this size.
Read-only int.

Remarks

Sizes are compared by their components with == and can be used as dictionary keys or set members.

See Also