| 1225 | } |
| 1226 | |
| 1227 | ImVec2 ImBezierQuadraticCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, float t) |
| 1228 | { |
| 1229 | float u = 1.0f - t; |
| 1230 | float w1 = u * u; |
| 1231 | float w2 = 2 * u * t; |
| 1232 | float w3 = t * t; |
| 1233 | return ImVec2(w1 * p1.x + w2 * p2.x + w3 * p3.x, w1 * p1.y + w2 * p2.y + w3 * p3.y); |
| 1234 | } |
| 1235 | |
| 1236 | // Closely mimics ImBezierCubicClosestPointCasteljau() in imgui.cpp |
| 1237 | static void PathBezierCubicCurveToCasteljau(ImVector<ImVec2>* path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float tess_tol, int level) |
no test coverage detected