small change

This commit is contained in:
ww-rm
2025-04-17 16:30:45 +08:00
parent 07204417a5
commit 378c66a333

View File

@@ -77,7 +77,7 @@ namespace SpineViewer.Spine
// 除此之外, 似乎还和 tex 的 Dispose 有关 // 除此之外, 似乎还和 tex 的 Dispose 有关
// 如果不对 tex 进行 Dispose, 那么不管是否 Draw 都正常不会死锁 // 如果不对 tex 进行 Dispose, 那么不管是否 Draw 都正常不会死锁
var tex = new SFML.Graphics.RenderTexture((uint)PreviewResolution.Width, (uint)PreviewResolution.Height); var tex = new SFML.Graphics.RenderTexture((uint)PreviewResolution.Width, (uint)PreviewResolution.Height);
var bounds = getCurrentBounds().GetResolutionBounds(PreviewResolution, new(0), new(0)); var bounds = getCurrentBounds().GetCanvasBounds(PreviewResolution);
using var view = new SFML.Graphics.View( using var view = new SFML.Graphics.View(
new(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2), new(bounds.X + bounds.Width / 2, bounds.Y + bounds.Height / 2),
new(bounds.Width, -bounds.Height) new(bounds.Width, -bounds.Height)