Scissor Fix

This commit is contained in:
JacobTech 2024-05-27 20:18:46 -04:00
parent 31d20221a6
commit 3595cfc27d
2 changed files with 13 additions and 5 deletions

View File

@ -10,7 +10,7 @@
<IncludeSymbols>False</IncludeSymbols>
<RepositoryUrl>https://git.jacobtech.com/JacobTech.com/GraphicsManager</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.0.9-alpha81</Version>
<Version>1.0.9-alpha83</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

View File

@ -76,12 +76,20 @@ public abstract class ParentBase : Rectangle, IParent
if (Location.Y > nh)
return;
else
{
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);
base.Draw(nx,ny,nw,nh);