| 2831 | } |
| 2832 | |
| 2833 | IMPLOT_INLINE void RenderPieSliceLine(ImDrawList& draw_list, ImVec2* buffer, int count, ImU32 col) { |
| 2834 | float half_weight = 1.0f; // Weight of 2.0f -> half_weight of 1.0f |
| 2835 | ImVec2 tex_uv0, tex_uv1; |
| 2836 | GetLineRenderProps(draw_list, half_weight, tex_uv0, tex_uv1); |
| 2837 | |
| 2838 | // Polyline with n points has n-1 segments, each needs 4 vertices and 6 indices |
| 2839 | const int segments = count - 1; |
| 2840 | const int vtx_count = segments * 4; |
| 2841 | const int idx_count = segments * 6; |
| 2842 | draw_list.PrimReserve(idx_count, vtx_count); |
| 2843 | PrimPieSliceLine(draw_list, buffer, count, col, half_weight, tex_uv0, tex_uv1); |
| 2844 | } |
| 2845 | |
| 2846 | IMPLOT_INLINE void RenderPieSlice(ImDrawList& draw_list, const ImPlotPoint& center, double radius, double a0, double a1, ImU32 col, ImPlotPieChartFlags flags, bool detached = false) { |
| 2847 | const float resolution = 50 / (2 * IM_PI); |
no test coverage detected