1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-13 22:48:50 -05:00

hard code color of pie labels

This commit is contained in:
Evan Pezent 2020-05-05 13:41:18 -05:00
parent 3bc08a946c
commit 22cf50cc44

View File

@ -2181,8 +2181,8 @@ void PlotPieChart(const char** label_ids, float* values, int count, const ImVec2
ImVec2 size = CalcTextSize(buffer);
float angle = a0 + (a1 - a0) * 0.5f;
ImVec2 pos = PlotToPixels(center.x + 0.5f * radius * cos(angle), center.y + 0.5f * radius * sin(angle));
DrawList.AddText(pos - size * 0.5f + ImVec2(1,1), gp.Col_Bg, buffer);
DrawList.AddText(pos - size * 0.5f, GetColorU32(ImGuiCol_Text), buffer);
DrawList.AddText(pos - size * 0.5f + ImVec2(1,1), IM_COL32(0,0,0,255), buffer);
DrawList.AddText(pos - size * 0.5f, IM_COL32(255,255,255,255), buffer);
}
}
a0 = a1;