tiny_skia

Module line_clipper

Source

Constants§

Functions§

  • Clip the line pts[0]…pts[1] against clip, ignoring segments that lie completely above or below the clip. For portions to the left or right, turn those into vertical line segments that are aligned to the edge of the clip.
  • 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[].
  • Returns value between the two limits, where the limits are either ascending or descending.
  • nested_lt 🔒
  • Returns X coordinate of intersection with horizontal line at Y.
  • Returns Y coordinate of intersection with vertical line at X.