PathDataBBox traverses the path data and extracts the local bounding box
(data []PathData)
| 611 | |
| 612 | // PathDataBBox traverses the path data and extracts the local bounding box |
| 613 | func PathDataBBox(data []PathData) math32.Box2 { |
| 614 | bb := math32.B2Empty() |
| 615 | PathDataIterFunc(data, func(idx int, cmd PathCmds, ptIndex int, cp math32.Vector2, ctrls []math32.Vector2) bool { |
| 616 | bb.ExpandByPoint(cp) |
| 617 | return tree.Continue |
| 618 | }) |
| 619 | return bb |
| 620 | } |
| 621 | |
| 622 | // PathDataStart gets the starting coords and angle from the path |
| 623 | func PathDataStart(data []PathData) (vec math32.Vector2, ang float32) { |
no test coverage detected