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

Function RenderPieSliceFill

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

Source from the content-addressed store, hash-verified

2822}
2823
2824IMPLOT_INLINE void RenderPieSliceFill(ImDrawList& draw_list, ImVec2* buffer, int count, ImU32 col) {
2825 const ImVec2 uv = draw_list._Data->TexUvWhitePixel;
2826 // Reserve space for vertices and indices
2827 // Triangle fan: n-2 triangles for n vertices, so (n-2)*3 indices
2828 const int idx_count = (count - 2) * 3;
2829 draw_list.PrimReserve(idx_count, count);
2830 PrimPieSliceFill(draw_list, buffer, count, col, uv);
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

Callers 1

RenderPieSliceFunction · 0.85

Calls 2

PrimPieSliceFillFunction · 0.85
PrimReserveMethod · 0.80

Tested by

no test coverage detected