mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 11:44:51 +08:00
handle rotations of 360 degrees or more #90
This commit is contained in:
@@ -47,6 +47,11 @@
|
||||
/// <param name="rotation">Rotation in degrees clockwise.</param>
|
||||
public PageRotationDegrees(int rotation)
|
||||
{
|
||||
while (rotation >= 360)
|
||||
{
|
||||
rotation -= 360;
|
||||
}
|
||||
|
||||
if (rotation != 0 && rotation != 90 && rotation != 180 && rotation != 270)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(rotation), $"Rotation must be 0, 90, 180 or 270. Got: {rotation}.");
|
||||
|
Reference in New Issue
Block a user