Scissoring now works and implemented; Refactoring as well;

This commit is contained in:
2019-03-27 02:35:20 -05:00
parent b045033b25
commit d7ca521b9b
17 changed files with 129 additions and 119 deletions

View File

@@ -1,5 +1,4 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.Render;
namespace RecrownedAthenaeum.SpecialTypes

View File

@@ -98,9 +98,7 @@ namespace RecrownedAthenaeum.SpecialTypes
throw new InvalidOperationException("Begin must be called to draw a nine patch!");
}
SamplerState originalSamplerState = spriteBatch.SamplerState;
GraphicsDevice graphics = spriteBatch.GraphicsDevice;
spriteBatch.Begin(samplerState: SamplerState.PointClamp);
spriteBatch.BeginWithoutSaving(samplerState: SamplerState.PointClamp);
Rectangle[] destinations = GenenerateDestinationRectangles(destination.Width, destination.Height);
for (int i = 0; i < destinations.Length; i++)
@@ -111,7 +109,7 @@ namespace RecrownedAthenaeum.SpecialTypes
}
spriteBatch.End();
spriteBatch.Begin(samplerState: originalSamplerState);
spriteBatch.Begin();
}
/// <summary>