Added check for invalid parameters.
This commit is contained in:
parent
775e04fffa
commit
ce2f402153
@ -111,6 +111,8 @@ namespace RecrownedAthenaeum.SpecialTypes
|
|||||||
/// <param name="origin">Not considered for 9patches.</param>
|
/// <param name="origin">Not considered for 9patches.</param>
|
||||||
public void Draw(SpriteBatch spriteBatch, Rectangle destination, Color color, float rotation = 0, Vector2 origin = default(Vector2))
|
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);
|
Draw(spriteBatch, destination, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user