MCPcopy Create free account
hub / github.com/RenderKit/embree / PathBezierQuadraticCurveTo

Method PathBezierQuadraticCurveTo

tutorials/common/imgui/imgui_draw.cpp:1296–1310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1294}
1295
1296void ImDrawList::PathBezierQuadraticCurveTo(const ImVec2& p2, const ImVec2& p3, int num_segments)
1297{
1298 ImVec2 p1 = _Path.back();
1299 if (num_segments == 0)
1300 {
1301 IM_ASSERT(_Data->CurveTessellationTol > 0.0f);
1302 PathBezierQuadraticCurveToCasteljau(&_Path, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, _Data->CurveTessellationTol, 0);// Auto-tessellated
1303 }
1304 else
1305 {
1306 float t_step = 1.0f / (float)num_segments;
1307 for (int i_step = 1; i_step <= num_segments; i_step++)
1308 _Path.push_back(ImBezierQuadraticCalc(p1, p2, p3, t_step * i_step));
1309 }
1310}
1311
1312IM_STATIC_ASSERT(ImDrawFlags_RoundCornersTopLeft == (1 << 4));
1313static inline ImDrawFlags FixRectCornerFlags(ImDrawFlags flags)

Callers

nothing calls this directly

Calls 3

ImBezierQuadraticCalcFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected