mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 02:10:16 +00:00
优化DrawBackground接口
This commit is contained in:
@@ -37,7 +37,7 @@ namespace XCharts.Runtime
|
|||||||
DrawBackground(vh, background, backgroundColor);
|
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)
|
if (!background.show)
|
||||||
return;
|
return;
|
||||||
@@ -47,7 +47,7 @@ namespace XCharts.Runtime
|
|||||||
var borderColor = background.borderStyle.GetRuntimeBorderColor();
|
var borderColor = background.borderStyle.GetRuntimeBorderColor();
|
||||||
var cornerRadius = background.borderStyle.GetRuntimeCornerRadius();
|
var cornerRadius = background.borderStyle.GetRuntimeCornerRadius();
|
||||||
UGL.DrawRoundRectangleWithBorder(vh, background.rect, color, color, cornerRadius,
|
UGL.DrawRoundRectangleWithBorder(vh, background.rect, color, color, cornerRadius,
|
||||||
borderWidth, borderColor);
|
borderWidth, borderColor, 0, smoothness);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void InitBackground(UIComponent component)
|
internal static void InitBackground(UIComponent component)
|
||||||
|
|||||||
Reference in New Issue
Block a user