clipSegment static method

dynamic clipSegment(
  1. Point a,
  2. Point b,
  3. Bounds bounds, [
  4. bool? useLastCode,
  5. bool? round,
])

Clips the segment a to b by rectangular bounds with the Cohen-Sutherland algorithm (modifying the segment points directly!).

Used by Leaflet to only show polyline points that are on the screen or near, increasing performance.

Implementation

external static dynamic clipSegment(
  Point a,
  Point b,
  Bounds bounds, [
  bool? useLastCode,
  bool? round,
]);