优化DrawBackground接口

This commit is contained in:
monitor1394
2024-12-27 22:13:35 +08:00
parent d466ac2bc1
commit 21cd72b995

View File

@@ -37,7 +37,7 @@ namespace XCharts.Runtime
DrawBackground(vh, background, backgroundColor);
}
public static void DrawBackground(VertexHelper vh, Background background, Color32 color)
public static void DrawBackground(VertexHelper vh, Background background, Color32 color, float smoothness = 2)
{
if (!background.show)
return;
@@ -47,7 +47,7 @@ namespace XCharts.Runtime
var borderColor = background.borderStyle.GetRuntimeBorderColor();
var cornerRadius = background.borderStyle.GetRuntimeCornerRadius();
UGL.DrawRoundRectangleWithBorder(vh, background.rect, color, color, cornerRadius,
borderWidth, borderColor);
borderWidth, borderColor, 0, smoothness);
}
internal static void InitBackground(UIComponent component)