MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / PathArcTo

Method PathArcTo

lib/imgui/imgui_draw.cpp:909–925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

907}
908
909void ImDrawList::PathArcTo(const ImVec2& center, float radius, float a_min, float a_max, int num_segments)
910{
911 if (radius == 0.0f)
912 {
913 _Path.push_back(center);
914 return;
915 }
916
917 // Note that we are adding a point at both a_min and a_max.
918 // If you are trying to draw a full closed circle you don't want the overlapping points!
919 _Path.reserve(_Path.Size + (num_segments + 1));
920 for (int i = 0; i <= num_segments; i++)
921 {
922 const float a = a_min + ((float)i / (float)num_segments) * (a_max - a_min);
923 _Path.push_back(ImVec2(center.x + ImCos(a) * radius, center.y + ImSin(a) * radius));
924 }
925}
926
927ImVec2 ImBezierCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, float t)
928{

Callers 3

ColorPicker4Method · 0.80

Calls 3

ImVec2Class · 0.85
push_backMethod · 0.45
reserveMethod · 0.45

Tested by

no test coverage detected