MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / _PathArcToN

Method _PathArcToN

KBotExt/imgui/imgui_draw.cpp:1141–1157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1139}
1140
1141void ImDrawList::_PathArcToN(const ImVec2& center, float radius, float a_min, float a_max, int num_segments)
1142{
1143 if (radius < 0.5f)
1144 {
1145 _Path.push_back(center);
1146 return;
1147 }
1148
1149 // Note that we are adding a point at both a_min and a_max.
1150 // If you are trying to draw a full closed circle you don't want the overlapping points!
1151 _Path.reserve(_Path.Size + (num_segments + 1));
1152 for (int i = 0; i <= num_segments; i++)
1153 {
1154 const float a = a_min + ((float)i / (float)num_segments) * (a_max - a_min);
1155 _Path.push_back(ImVec2(center.x + ImCos(a) * radius, center.y + ImSin(a) * radius));
1156 }
1157}
1158
1159// 0: East, 3: South, 6: West, 9: North, 12: East
1160void ImDrawList::PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12)

Callers

nothing calls this directly

Calls 2

ImVec2Function · 0.85
reserveMethod · 0.80

Tested by

no test coverage detected