Module region
Expand description
Describes the set of pixels used to clip crate::Canvas. Region is compact, efficiently
storing a single integer rectangle, or a run length encoded array of rectangles. Region may
reduce the current crate::Canvas clip, or may be drawn as one or more integer rectangles.
The Region iterator returns the scan lines or rectangles contained by it, optionally
intersecting a bounding rectangle.
Structs§
- Cliperator
- Returns the sequence of rectangles, sorted along the y-axis, then the x-axis, that make up the region intersected with the specified clip rectangle.
- Iterator
- Goes through the region one rectangle at a time. For each “strip” of one or more contiguous Y values (scanlines) in ascending order, the iterator returns each rectangle in that strip (from left to right) before advancing to the next strip (which may or may not have a gap).
- Spanerator
- Returns the line segment ends within the region that intersect a horizontal line.