:right-sidebar: True Size =================================================================== .. currentmodule:: gi.repository.Graphene .. versionadded:: 1.0 .. class:: Size(*args, **kwargs) :no-contents-entry: A size. Constructors ------------ .. rst-class:: interim-class .. class:: Size :no-index: .. classmethod:: alloc() -> ~gi.repository.Graphene.Size Allocates a new :obj:`~gi.repository.Graphene.Size`\. The contents of the returned value are undefined. .. versionadded:: 1.0 Methods ------- .. rst-class:: interim-class .. class:: Size :no-index: .. method:: equal(b: ~gi.repository.Graphene.Size) -> bool Checks whether the two give :obj:`~gi.repository.Graphene.Size` are equal. .. versionadded:: 1.0 :param b: a :obj:`~gi.repository.Graphene.Size` .. method:: free() -> None Frees the resources allocated by :func:`~gi.repository.Graphene.Size.alloc`. .. versionadded:: 1.0 .. method:: init(width: float, height: float) -> ~gi.repository.Graphene.Size Initializes a :obj:`~gi.repository.Graphene.Size` using the given ``width`` and ``height``\. .. versionadded:: 1.0 :param width: the width :param height: the height .. method:: init_from_size(src: ~gi.repository.Graphene.Size) -> ~gi.repository.Graphene.Size Initializes a :obj:`~gi.repository.Graphene.Size` using the width and height of the given ``src``\. .. versionadded:: 1.0 :param src: a :obj:`~gi.repository.Graphene.Size` .. method:: interpolate(b: ~gi.repository.Graphene.Size, factor: float) -> ~gi.repository.Graphene.Size Linearly interpolates the two given :obj:`~gi.repository.Graphene.Size` using the given interpolation ``factor``\. .. versionadded:: 1.0 :param b: a :obj:`~gi.repository.Graphene.Size` :param factor: the linear interpolation factor .. method:: scale(factor: float) -> ~gi.repository.Graphene.Size Scales the components of a :obj:`~gi.repository.Graphene.Size` using the given ``factor``\. .. versionadded:: 1.0 :param factor: the scaling factor .. classmethod:: zero() -> ~gi.repository.Graphene.Size A constant pointer to a zero :obj:`~gi.repository.Graphene.Size`\, useful for equality checks and interpolations. .. versionadded:: 1.0 Fields ------ .. rst-class:: interim-class .. class:: Size :no-index: .. attribute:: height The height .. attribute:: width The width