From 06694c9e894fddbf03fd8e9ac3d6cab51e0bdb89 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Thu, 2 Oct 2025 11:29:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Spine/Interfaces/SpineExtension.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Spine/Interfaces/SpineExtension.cs b/Spine/Interfaces/SpineExtension.cs index 46e4c96..d8e9fba 100644 --- a/Spine/Interfaces/SpineExtension.cs +++ b/Spine/Interfaces/SpineExtension.cs @@ -189,6 +189,7 @@ namespace Spine.Interfaces float u = u0 * w0 + u1 * w1 + u2 * w2; float v = v0 * w0 + v1 * w1 + v2 * w2; + // XXX: 如果贴图很大则 CopyToImage 比较耗时, 存在明显卡顿 SFML.Graphics.Image img = null; if (cache is not null) { @@ -202,7 +203,7 @@ namespace Spine.Interfaces img = tex.CopyToImage(); } - var texSize = img.Size; + var texSize = tex.Size; var pixel = img.GetPixel((uint)(u * texSize.X), (uint)(v * texSize.Y)); bool hit = pixel.A > 0;