From a3533dbc02c902c1bb6426480e018c1d9abcd073 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Mon, 1 Jan 2024 22:55:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0DrawRoundRectangleWithBorder?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/XUGL/UGL.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Runtime/XUGL/UGL.cs b/Runtime/XUGL/UGL.cs index a290ef5b..99f28570 100644 --- a/Runtime/XUGL/UGL.cs +++ b/Runtime/XUGL/UGL.cs @@ -1059,6 +1059,18 @@ namespace XUGL } } + public static void DrawRoundRectangleWithBorder(VertexHelper vh, Rect rect, + Color32 color, Color32 toColor, float[] cornerRadius, float borderWidth, Color32 borderColor, + float rotate = 0, float smoothness = 2) + { + DrawRoundRectangle(vh, rect.center, rect.width, rect.height, color, toColor, rotate, cornerRadius, + false, smoothness, false); + if (borderWidth > 0) + { + UGL.DrawBorder(vh, rect, borderWidth, borderColor, rotate, cornerRadius); + } + } + /// /// 绘制(圆角)边框 ///