mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
重构代码,将与绘制相关的Color改为Color32,减少隐式转换
This commit is contained in:
@@ -457,19 +457,17 @@ namespace XCharts
|
||||
else return tooltip.numericFormatter;
|
||||
}
|
||||
|
||||
public static Color GetLineColor(Tooltip tooltip, ThemeInfo theme)
|
||||
public static Color32 GetLineColor(Tooltip tooltip, ThemeInfo theme)
|
||||
{
|
||||
var lineStyle = tooltip.lineStyle;
|
||||
if (!ChartHelper.IsClearColor(lineStyle.color))
|
||||
{
|
||||
var color = lineStyle.color;
|
||||
color.a *= lineStyle.opacity;
|
||||
return color;
|
||||
return lineStyle.GetColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
var color = (Color)theme.tooltipLineColor;
|
||||
color.a *= lineStyle.opacity;
|
||||
var color = theme.tooltipLineColor;
|
||||
ChartHelper.SetColorOpacity(ref color, lineStyle.opacity);
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user