Lines Matching defs:num_segments
953 void ImDrawList::PathArcTo(const ImVec2& centre, float radius, float a_min, float a_max, int num_segments)
963 _Path.reserve(_Path.Size + (num_segments + 1));
964 for (int i = 0; i <= num_segments; i++)
966 const float a = a_min + ((float)i / (float)num_segments) * (a_max - a_min);
997 void ImDrawList::PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments)
1000 if (num_segments == 0)
1007 float t_step = 1.0f / (float)num_segments;
1008 for (int i_step = 1; i_step <= num_segments; i_step++)
1144 void ImDrawList::AddCircle(const ImVec2& centre, float radius, ImU32 col, int num_segments, float thickness)
1146 if ((col & IM_COL32_A_MASK) == 0 || num_segments <= 2)
1150 const float a_max = IM_PI*2.0f * ((float)num_segments - 1.0f) / (float)num_segments;
1151 PathArcTo(centre, radius-0.5f, 0.0f, a_max, num_segments - 1);
1155 void ImDrawList::AddCircleFilled(const ImVec2& centre, float radius, ImU32 col, int num_segments)
1157 if ((col & IM_COL32_A_MASK) == 0 || num_segments <= 2)
1161 const float a_max = IM_PI*2.0f * ((float)num_segments - 1.0f) / (float)num_segments;
1162 PathArcTo(centre, radius, 0.0f, a_max, num_segments - 1);
1166 void ImDrawList::AddBezierCurve(const ImVec2& pos0, const ImVec2& cp0, const ImVec2& cp1, const ImVec2& pos1, ImU32 col, float thickness, int num_segments)
1172 PathBezierCurveTo(cp0, cp1, pos1, num_segments);