Guaranteed to honor 'num_segments'
| 1162 | |
| 1163 | // Guaranteed to honor 'num_segments' |
| 1164 | void ImDrawList::AddNgon(const ImVec2& center, float radius, ImU32 col, int num_segments, float thickness) |
| 1165 | { |
| 1166 | if ((col & IM_COL32_A_MASK) == 0 || num_segments <= 2) |
| 1167 | return; |
| 1168 | |
| 1169 | // Because we are filling a closed shape we remove 1 from the count of segments/points |
| 1170 | const float a_max = (IM_PI * 2.0f) * ((float)num_segments - 1.0f) / (float)num_segments; |
| 1171 | PathArcTo(center, radius - 0.5f, 0.0f, a_max, num_segments - 1); |
| 1172 | PathStroke(col, true, thickness); |
| 1173 | } |
| 1174 | |
| 1175 | // Guaranteed to honor 'num_segments' |
| 1176 | void ImDrawList::AddNgonFilled(const ImVec2& center, float radius, ImU32 col, int num_segments) |
no outgoing calls
no test coverage detected