From 3595cfc27d75beae7d43a3cc4efb5cbedc7cf2cd Mon Sep 17 00:00:00 2001 From: JacobTech Date: Mon, 27 May 2024 20:18:46 -0400 Subject: [PATCH] Scissor Fix --- GraphicsManager/GraphicsManager.csproj | 2 +- GraphicsManager/Objects/Core/ParentBase.cs | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/GraphicsManager/GraphicsManager.csproj b/GraphicsManager/GraphicsManager.csproj index 0e2981d..2ec1245 100644 --- a/GraphicsManager/GraphicsManager.csproj +++ b/GraphicsManager/GraphicsManager.csproj @@ -10,7 +10,7 @@ False https://git.jacobtech.com/JacobTech.com/GraphicsManager git - 1.0.9-alpha81 + 1.0.9-alpha83 diff --git a/GraphicsManager/Objects/Core/ParentBase.cs b/GraphicsManager/Objects/Core/ParentBase.cs index 4ecd509..ea49c09 100644 --- a/GraphicsManager/Objects/Core/ParentBase.cs +++ b/GraphicsManager/Objects/Core/ParentBase.cs @@ -77,10 +77,18 @@ public abstract class ParentBase : Rectangle, IParent return; else { - ny += Location.Y; - nh -= Location.Y; - if (Size.Y < nh) - nh = Size.Y; + if (Location.Y > -1) + { + ny += Location.Y; + nh -= Location.Y; + if (Size.Y < nh) + nh = Size.Y; + } + else + { + if (Size.Y + Location.Y < nh) + nh = Size.Y + Location.Y; + } } if (nw == 0 || nh == 0) return; GL.Scissor(nx, Window!.CS.Y - ny - nh, nw, nh);