MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / RenderPieSliceLine

Function RenderPieSliceLine

Source/3rdParty/implot/implot_items.cpp:2833–2844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2831}
2832
2833IMPLOT_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
2846IMPLOT_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);

Callers 1

RenderPieSliceFunction · 0.85

Calls 3

GetLineRenderPropsFunction · 0.85
PrimPieSliceLineFunction · 0.85
PrimReserveMethod · 0.80

Tested by

no test coverage detected