draws a curve from the current position, towards (but not through) `q1x, q1y`, then onto `x, y`.
(double q1x, double q1y, double x, double y)
| 297 | double c1x = (at.x + q1x * 2) / 3; |
| 298 | double c1y = (at.y + q1y * 2) / 3; |
| 299 | double c2x = (at.x * 2 + q1x) / 3; |
| 300 | double c2y = (at.y * 2 + q1y) / 3; |
| 301 | |
| 302 | return cubicTo(c1x, c1y, c2x, c2y, x, y); |
| 303 | } |
| 304 | |
| 305 | /** |
| 306 | * draws a curve from the current position, towards (but not through) the relative position `q1x, q1y`, then onto + `x, y`. |
| 307 | */ |
| 308 | public FLine quadToRel(double q1x, double q1y, double x, double y) { |
| 309 | if (nodes.size() == 0) return moveTo(x, y); |
| 310 | |
| 311 | Vec3 at = last().to; |
| 312 | |
| 313 | return quadTo(at.x + q1x, at.y + q1y, at.x + x, at.y + y); |