Function tiny_skia::line_clipper::intersect
source ยท pub fn intersect(src: &[Point; 2], clip: &Rect, dst: &mut [Point; 2]) -> bool
Expand description
Intersect the line segment against the rect. If there is a non-empty resulting segment, return true and set dst[] to that segment. If not, return false and ignore dst[].
clip
is specialized for scan-conversion, as it adds vertical
segments on the sides to show where the line extended beyond the
left or right sides. intersect
does not.