PolylineFromPath returns a polyline from the given path by approximating it by linear line segments, i.e. by flattening.
(p *Path)
| 9 | |
| 10 | // PolylineFromPath returns a polyline from the given path by approximating it by linear line segments, i.e. by flattening. |
| 11 | func PolylineFromPath(p *Path) *Polyline { |
| 12 | return &Polyline{p.Flatten(Tolerance).Coords()} |
| 13 | } |
| 14 | |
| 15 | // PolylineFromPathCoords returns a polyline from the given path from each of the start/end coordinates of the segments, i.e. converting all non-linear segments to linear ones. |
| 16 | func PolylineFromPathCoords(p *Path) *Polyline { |