| 406 | } |
| 407 | |
| 408 | void SL::MakeMonotonic(int n, Spline1 splines[], bool closed) |
| 409 | { |
| 410 | if (n >= 2) |
| 411 | { |
| 412 | if (closed) |
| 413 | splines[0] = Monotonic(splines[n - 1].x, splines[0], splines[1].w); |
| 414 | else |
| 415 | splines[0] = MonotonicRight(splines[0], splines[1].w); |
| 416 | } |
| 417 | else if (n >= 1) |
| 418 | splines[0] = splines[0]; |
| 419 | |
| 420 | for (int i = 1; i < n - 1; i++) |
| 421 | splines[i] = Monotonic(splines[i - 1].x, splines[i], splines[i + 1].w); |
| 422 | |
| 423 | if (n >= 2) |
| 424 | { |
| 425 | if (closed) |
| 426 | splines[n - 1] = Monotonic(splines[n - 2].x, splines[n - 1], splines[0].w); |
| 427 | else |
| 428 | splines[n - 1] = MonotonicLeft(splines[n - 2].x, splines[n - 1]); |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | Vec2f SL::FastBounds(const Spline1& s) |
| 433 | //Returns bounds of the convex hull |
nothing calls this directly
no test coverage detected