Skip to content

Commit 9732c4c

Browse files
committed
DrawRectangularPolygon_Transformed
1 parent a29ecc2 commit 9732c4c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

tests/ImageSharp.Drawing.Tests/Drawing/DrawPolygonTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,17 @@ public void DrawPolygon_Transformed<TPixel>(TestImageProvider<TPixel> provider)
5151
c => c.SetDrawingTransform(Matrix3x2.CreateSkew(GeometryUtilities.DegreeToRadian(-15), 0, new Vector2(200, 200)))
5252
.DrawPolygon(Color.White, 2.5f, simplePath));
5353
}
54+
55+
[Theory]
56+
[WithBasicTestPatternImages(100, 100, PixelTypes.Rgba32)]
57+
public void DrawRectangularPolygon_Transformed<TPixel>(TestImageProvider<TPixel> provider)
58+
where TPixel : unmanaged, IPixel<TPixel>
59+
{
60+
var polygon = new RectangularPolygon(25, 25, 50, 50);
61+
62+
provider.RunValidatingProcessorTest(
63+
c => c.SetDrawingTransform(Matrix3x2.CreateRotation((float)Math.PI / 4, new PointF(50, 50)))
64+
.Draw(Color.White, 2.5f, polygon));
65+
}
5466
}
5567
}
1.39 KB
Loading

0 commit comments

Comments
 (0)