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
Sets fX to x, fY to y.
Overloaded function.
Returns true if
IPoint
is equivalent toIPoint
constructed from (x, y).Returns true if fX and fY are both zero.
Sets fX to x and fY to y.
Returns x-axis value of
IPoint
.Returns y-axis value of
IPoint
.Attributes
x-axis value
y-axis value
Methods
- static IPoint.Make(x: int, y: int) skia.IPoint
Sets fX to x, fY to y.
- IPoint.__init__(*args, **kwargs)
Overloaded function.
__init__(self: skia.IPoint, x: int, y: int) -> None
__init__(self: skia.IPoint, t: tuple) -> None
- IPoint.equals(self: skia.IPoint, x: int, y: int) bool
Returns true if
IPoint
is equivalent toIPoint
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