Skip to content
GitLab
项目
群组
代码片段
/
帮助
帮助
支持
社区论坛
快捷键
?
提交反馈
登录
切换导航
菜单
打开侧边栏
ExternalRepo
implot
提交
ab24f756
提交
ab24f756
编辑于
4年前
作者:
Evan Pezent
浏览文件
操作
下载
电子邮件补丁
差异文件
make pie plots respond to fits
上级
e9469cf3
变更
1
Hide whitespace changes
Inline
Side-by-side
显示
1 个更改的文件
implot_items.cpp
+4
-0
implot_items.cpp
有
4 个添加
和
0 个删除
+4
-0
implot_items.cpp
+
4
-
0
浏览文件 @
ab24f756
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
支持
Markdown
0%
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录