* UILight: 恢复全局矩形设计时圆形灯光效果

This commit is contained in:
Sunny 2023-08-28 22:19:08 +08:00
parent a24e08cfb5
commit 5cc970b9bc

View File

@ -21,6 +21,7 @@
* 2021-08-07: V3.0.5 线
* 2022-05-15: V3.1.8
* 2023-05-12: V3.3.6 DrawString函数
* 2023-08-28: V3.4.2
******************************************************************************/
using System;
@ -186,7 +187,8 @@ namespace Sunny.UI
if (ShowCenterColor)
{
Color[] surroundColor = new Color[] { color };
PathGradientBrush gradientBrush = new PathGradientBrush(path);
using GraphicsPath path1 = ClientRectangle.CreateTrueRoundedRectanglePath(Height);
PathGradientBrush gradientBrush = new PathGradientBrush(path1);
gradientBrush.CenterPoint = new PointF(ShowSize / 2.0f, ShowSize / 2.0f);
gradientBrush.CenterColor = cColor;
gradientBrush.SurroundColors = surroundColor;