Size

Added in version 1.0.

class Size(*args, **kwargs)

A size.

Constructors

class Size
classmethod alloc() Size

Allocates a new Size.

The contents of the returned value are undefined.

Added in version 1.0.

Methods

class Size
equal(b: Size) bool

Checks whether the two give Size are equal.

Added in version 1.0.

Parameters:

b – a Size

free() None

Frees the resources allocated by alloc().

Added in version 1.0.

init(width: float, height: float) Size

Initializes a Size using the given width and height.

Added in version 1.0.

Parameters:
  • width – the width

  • height – the height

init_from_size(src: Size) Size

Initializes a Size using the width and height of the given src.

Added in version 1.0.

Parameters:

src – a Size

interpolate(b: Size, factor: float) Size

Linearly interpolates the two given Size using the given interpolation factor.

Added in version 1.0.

Parameters:
  • b – a Size

  • factor – the linear interpolation factor

scale(factor: float) Size

Scales the components of a Size using the given factor.

Added in version 1.0.

Parameters:

factor – the scaling factor

zero() Size

A constant pointer to a zero Size, useful for equality checks and interpolations.

Added in version 1.0.

Fields

class Size
height

The height

width

The width