| 907 | } |
| 908 | |
| 909 | void 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 | |
| 927 | ImVec2 ImBezierCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, float t) |
| 928 | { |
no test coverage detected