CP2 returns the second control point for cubic Béziers.
()
| 57 | |
| 58 | // CP2 returns the second control point for cubic Béziers. |
| 59 | func (s *PathScanner) CP2() Point { |
| 60 | if s.p.d[s.i] != CubeToCmd { |
| 61 | panic("must be cubic Bézier") |
| 62 | } |
| 63 | i := s.i - cmdLen(s.p.d[s.i]) + 1 |
| 64 | return Point{s.p.d[i+3], s.p.d[i+4]} |
| 65 | } |
| 66 | |
| 67 | // Arc returns the arguments for arcs (rx,ry,rot,large,sweep). |
| 68 | func (s *PathScanner) Arc() (float64, float64, float64, bool, bool) { |