From ce2f402153f45b2ca23790980bc728008e9b913c Mon Sep 17 00:00:00 2001 From: Recrown Date: Sat, 9 Mar 2019 00:54:41 -0600 Subject: [PATCH] Added check for invalid parameters. --- RecrownedAthenaeum/SpecialTypes/NinePatch.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RecrownedAthenaeum/SpecialTypes/NinePatch.cs b/RecrownedAthenaeum/SpecialTypes/NinePatch.cs index dae92ff..13a685d 100644 --- a/RecrownedAthenaeum/SpecialTypes/NinePatch.cs +++ b/RecrownedAthenaeum/SpecialTypes/NinePatch.cs @@ -111,6 +111,8 @@ namespace RecrownedAthenaeum.SpecialTypes /// Not considered for 9patches. public void Draw(SpriteBatch spriteBatch, Rectangle destination, Color color, float rotation = 0, Vector2 origin = default(Vector2)) { + if (rotation != 0) throw new NotImplementedException("Ninepatches can't be rotated."); + if (origin != default(Vector2)) throw new NotImplementedException("Ninepatches can't have origin changed (hint: use the destination rectangle to shift and position)."); Draw(spriteBatch, destination, color); } }