IPoint

class IPoint

IPoint holds two 32-bit integer coordinates.

Example:

point = skia.IPoint(0, 0)
point = skia.IPoint((0, 0))  # Convert from tuple
print(point.fX, point.fY)
point + (1, 1)   # Add offset
point - (0, 0)   # Subtract offset
x, y = tuple(point)  # Convert to tuple

Methods

Make

Sets fX to x, fY to y.

__init__

__init__(*args, **kwargs) Overloaded function.

equals

Returns true if IPoint is equivalent to IPoint constructed from (x, y).

isZero

Returns true if fX and fY are both zero.

set

Sets fX to x and fY to y.

x

Returns x-axis value of IPoint.

y

Returns y-axis value of IPoint.

Attributes

fX

x-axis value

fY

y-axis value

Methods

static IPoint.Make(x: int, y: int) skia.IPoint

Sets fX to x, fY to y.

Parameters
  • x – integer x-axis value of constructed IPoint

  • y – integer y-axis value of constructed IPoint

Returns

IPoint (x, y)

IPoint.__init__(*args, **kwargs)

__init__(*args, **kwargs) Overloaded function.

  1. __init__(self: skia.IPoint, x: int, y: int) -> None

    Sets fX to x, fY to y.

    x

    integer x-axis value of constructed IPoint

    y

    integer y-axis value of constructed IPoint

  2. __init__(self: skia.IPoint, t: tuple) -> None

IPoint.equals(self: skia.IPoint, x: int, y: int) bool

Returns true if IPoint is equivalent to IPoint constructed from (x, y).

Parameters
  • x – value compared with fX

  • y – value compared with fY

IPoint.isZero(self: skia.IPoint) bool

Returns true if fX and fY are both zero.

IPoint.set(self: skia.IPoint, x: int, y: int) None

Sets fX to x and fY to y.

IPoint.x(self: skia.IPoint) int

Returns x-axis value of IPoint.

IPoint.y(self: skia.IPoint) int

Returns y-axis value of IPoint.

Attributes

IPoint.fX

x-axis value

IPoint.fY

y-axis value