animator.skia.Region

class animator.skia.Region

Bases: pybind11_builtins.pybind11_object

Region describes the set of pixels used to clip Canvas.

Region supports a few operators:

regionA == regionB  # Equality
regionA != regionB  # Inequality

regionA - regionB   # Difference
regionA & regionB   # Intersect
regionA | regionB   # Union
regionA ^ regionB   # XOR

regionA -= regionB  # In-place Difference
regionA &= regionB  # In-place Intersect
regionA |= regionB  # In-place Union
regionA ^= regionB  # In-place XOR
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: animator.skia.Region) -> None

  2. __init__(self: animator.skia.Region, region: animator.skia.Region) -> None

  3. __init__(self: animator.skia.Region, rect: animator.skia.IRect) -> None

Methods

__init__(*args, **kwargs)

Overloaded function.

computeRegionComplexity(self)

contains(*args, **kwargs)

Overloaded function.

getBoundaryPath(self, path)

getBounds(self)

intersects(*args, **kwargs)

Overloaded function.

isComplex(self)

isEmpty(self)

isRect(self)

makeTranslate(self, dx, dy)

Makes a copy of Region translated by dx and dy.

op(*args, **kwargs)

Overloaded function.

quickContains(self, r)

quickReject(*args, **kwargs)

Overloaded function.

readFromMemory(self, buffer)

Reads Region from given Data.

set(self, src)

setEmpty(self)

setPath(self, path, clip)

setRect(self, rect)

setRects(self, rects)

Constructs Region as the union of IRect in rects array.

setRegion(self, region)

swap(self, other)

translate(self, dx, dy)

writeToMemory(self)

Writes Region to Data and returns it.

Attributes

kOpCnt

class Op

Bases: pybind11_builtins.pybind11_object

Members:

kDifference_Op

kIntersect_Op

kUnion_Op

kXOR_Op

kReverseDifference_Op

kReplace_Op

kLastOp

property name
computeRegionComplexity(self: animator.skia.Region) int
contains(*args, **kwargs)

Overloaded function.

  1. contains(self: animator.skia.Region, x: int, y: int) -> bool

  2. contains(self: animator.skia.Region, other: animator.skia.IRect) -> bool

  3. contains(self: animator.skia.Region, other: animator.skia.Region) -> bool

getBoundaryPath(self: animator.skia.Region, path: animator.skia.Path) bool
getBounds(self: animator.skia.Region) animator.skia.IRect
intersects(*args, **kwargs)

Overloaded function.

  1. intersects(self: animator.skia.Region, rect: animator.skia.IRect) -> bool

  2. intersects(self: animator.skia.Region, other: animator.skia.Region) -> bool

isComplex(self: animator.skia.Region) bool
isEmpty(self: animator.skia.Region) bool
isRect(self: animator.skia.Region) bool
makeTranslate(self: animator.skia.Region, dx: int, dy: int) animator.skia.Region

Makes a copy of Region translated by dx and dy.

op(*args, **kwargs)

Overloaded function.

  1. op(self: animator.skia.Region, rect: animator.skia.IRect, op: animator.skia.Region.Op) -> bool

  2. op(self: animator.skia.Region, rgn: animator.skia.Region, op: animator.skia.Region.Op) -> bool

  3. op(self: animator.skia.Region, rect: animator.skia.IRect, rgn: animator.skia.Region, op: animator.skia.Region.Op) -> bool

  4. op(self: animator.skia.Region, rgn: animator.skia.Region, rect: animator.skia.IRect, op: animator.skia.Region.Op) -> bool

  5. op(self: animator.skia.Region, rgna: animator.skia.Region, rgnb: animator.skia.Region, op: animator.skia.Region.Op) -> bool

quickContains(self: animator.skia.Region, r: animator.skia.IRect) bool
quickReject(*args, **kwargs)

Overloaded function.

  1. quickReject(self: animator.skia.Region, rect: animator.skia.IRect) -> bool

  2. quickReject(self: animator.skia.Region, region: animator.skia.Region) -> bool

readFromMemory(self: animator.skia.Region, buffer: animator.skia.Data) int

Reads Region from given Data.

set(self: animator.skia.Region, src: animator.skia.Region) bool
setEmpty(self: animator.skia.Region) bool
setPath(self: animator.skia.Region, path: animator.skia.Path, clip: animator.skia.Region) bool
setRect(self: animator.skia.Region, rect: animator.skia.IRect) bool
setRects(self: animator.skia.Region, rects: List[animator.skia.IRect]) bool

Constructs Region as the union of IRect in rects array.

setRegion(self: animator.skia.Region, region: animator.skia.Region) bool
swap(self: animator.skia.Region, other: animator.skia.Region) None
translate(self: animator.skia.Region, dx: int, dy: int) None
writeToMemory(self: animator.skia.Region) animator.skia.Data

Writes Region to Data and returns it.