From 49c7ca47926f2d9c896c7a363d05385980346e8b Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 9 May 2025 14:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=BB=E7=AC=94=E5=AE=BD=E5=BA=A6=E5=92=8C?= =?UTF-8?q?=E6=A9=A1=E7=9A=AE=E5=AE=BD=E5=BA=A6=E9=80=82=E9=85=8D4K?= =?UTF-8?q?=E5=88=86=E8=BE=A8=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIDraw.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/UI/UIDraw.cs b/Assets/Scripts/UI/UIDraw.cs index 41e13012..1cbfeeee 100644 --- a/Assets/Scripts/UI/UIDraw.cs +++ b/Assets/Scripts/UI/UIDraw.cs @@ -7,6 +7,7 @@ using TMPro; using UnityEngine.EventSystems; using DG.Tweening; using System; +using Org.BouncyCastle.Asn1; namespace QFramework.Example { @@ -169,8 +170,9 @@ namespace QFramework.Example float sizeY = ((float)Screen.height / (float)Screen.width) * size; ScreenShotPainter.instance.SetEraserSize(size, sizeY); - float width = Screen.width / size; - float height = Screen.width / size;//y + float width = 1920 / size; + float height = 1920 / size;//y + Debug.LogError($"{width} : {height}"); Icon.transform.localScale = new Vector3(width / Icon.rectTransform.rect.width, height / Icon.rectTransform.rect.height, 1); } else @@ -180,8 +182,8 @@ namespace QFramework.Example float sizeY = ((float)Screen.height / (float)Screen.width) * size; ScreenShotPainter.instance.SetPaintingSize(size, sizeY); - float width = Screen.width / size; - float height = Screen.width / size;//y + float width = 1920 / size; + float height = 1920 / size;//y Icon.transform.localScale = new Vector3(width / Icon.rectTransform.rect.width, height / Icon.rectTransform.rect.height, 1); }