Scissoring now works and implemented; Refactoring as well;
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using RecrownedAthenaeum.Render;
|
||||
|
||||
namespace RecrownedAthenaeum.SpecialTypes
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user