Region.Spanerator
- class Spanerator
Returns the line segment ends within
Region
that intersect a horizontal line.Methods
Sets
Region.Spanerator
to return line segments inRegion
on scan line.Advances iterator to next span intersecting
Region
within line segment provided in constructor.
Methods
- Spanerator.__init__(self: skia.Region.Spanerator, region: skia.Region, y: int, left: int, right: int) None
Sets
Region.Spanerator
to return line segments inRegion
on scan line.- Parameters:
region (skia.Region) –
Region
to iteratey (int) – horizontal line to intersect
left (int) – bounds of iteration
right (int) – bounds of iteration
- Returns:
Region
iterator
- Spanerator.next(self: skia.Region.Spanerator, left: int, right: int) bool
Advances iterator to next span intersecting
Region
within line segment provided in constructor.Returns true if interval was found.
- Parameters:
left (int) – pointer to span start; may be nullptr
right (int) – pointer to span end; may be nullptr
- Returns:
true if interval was found