Skip to content

Commit f69c843

Browse files
committed
FillPathGradientBrushTests.FillComplex
1 parent 1c9f579 commit f69c843

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

tests/ImageSharp.Drawing.Tests/Drawing/FillPathGradientBrushTests.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,25 @@ public void ShouldThrowArgumentOutOfRangeExceptionWhenEmptyColorArrayIsGiven()
185185

186186
Assert.Throws<ArgumentOutOfRangeException>(Create);
187187
}
188+
189+
[Theory]
190+
[WithBlankImage(100, 100, PixelTypes.Rgba32)]
191+
public void FillComplex<TPixel>(TestImageProvider<TPixel> provider)
192+
where TPixel : unmanaged, IPixel<TPixel>
193+
=> provider.VerifyOperation(
194+
TolerantComparer,
195+
image =>
196+
{
197+
var star = new Star(50, 50, 5, 20, 45);
198+
PointF[] points = star.Points.ToArray();
199+
Color[] colors = { Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple,
200+
Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple };
201+
202+
var brush = new PathGradientBrush(points, colors, Color.White);
203+
204+
image.Mutate(x => x.Fill(brush));
205+
},
206+
appendSourceFileOrDescription: false,
207+
appendPixelTypeToFileName: false);
188208
}
189209
}

0 commit comments

Comments
 (0)