提交 ab24f756 编辑于 作者: Evan Pezent's avatar Evan Pezent
浏览文件

make pie plots respond to fits

上级 e9469cf3
显示 4 个添加0 个删除
+4 -0
......@@ -1730,6 +1730,10 @@ void PlotPieChart(const char* const label_ids[], const T* values, int count, dou
double percent = normalize ? (double)values[i] / sum : (double)values[i];
a1 = a0 + 2 * IM_PI * percent;
if (BeginItem(label_ids[i])) {
if (FitThisFrame()) {
FitPoint(ImPlotPoint(x-radius,y-radius));
FitPoint(ImPlotPoint(x+radius,y+radius));
}
ImU32 col = GetCurrentItem()->Color;
if (percent < 0.5) {
RenderPieSlice(DrawList, center, radius, a0, a1, col);
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册