23 writes to Positions
System.Drawing.Common.Tests (23)
System\Drawing\Drawing2D\ColorBlendTests.cs (2)
51ColorBlend blend = new() { Positions = null }; 54blend.Positions = new float[10];
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (11)
262Positions = [0, 10, 1] 379Positions = [0, 10, 1] 395Positions = [0, 1] 401Positions = [0, 0.5f, 1f] 437Assert.Throws<ArgumentException>(() => brush.InterpolationColors = new ColorBlend { Colors = new Color[2], Positions = null }); 450Positions = new float[positionsLength] 463Positions = positions 475Positions = [0, 0.5f, 1] 484Positions = [0f, 1f] 496Positions = [0, 0.5f, 1] 515Positions = [0, 0.5f, 1]
System\Drawing\Drawing2D\PathGradientBrushTests.cs (10)
533brush.InterpolationColors = new ColorBlend() { Colors = expectedColors, Positions = expectedPositions }; 537brush.InterpolationColors = new ColorBlend() { Colors = sameColors, Positions = expectedPositions }; 556brush.InterpolationColors.Positions = []; 558brush.InterpolationColors.Positions = new float[2]; 583brush.InterpolationColors = new ColorBlend() { Colors = null, Positions = null }); 586brush.InterpolationColors = new ColorBlend() { Colors = null, Positions = new float[2] }); 594brush.InterpolationColors = new ColorBlend() { Colors = new Color[1], Positions = null }); 609brush.InterpolationColors = new ColorBlend() { Colors = [], Positions = [] }); 617brush.InterpolationColors = new ColorBlend() { Colors = new Color[1], Positions = new float[2] }); 625brush.InterpolationColors = new ColorBlend() { Colors = new Color[2], Positions = new float[1] });
15 references to Positions
System.Drawing.Common.Tests (15)
System\Drawing\Drawing2D\ColorBlendTests.cs (4)
13Assert.Equal(new float[1], blend.Positions); 23Assert.Equal(new float[count], blend.Positions); 52Assert.Null(blend.Positions); 55Assert.Equal(new float[10], blend.Positions);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (6)
384Assert.Equal(blend.Positions, brush.InterpolationColors.Positions); 405Assert.Equal(blend.Positions, brush.InterpolationColors.Positions); 503brush.InterpolationColors.Positions.Should().HaveCount(1); 527brush.InterpolationColors.Positions.Should().HaveCount(1);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (5)
535Assert.Equal(expectedPositions, brush.InterpolationColors.Positions); 539Assert.Equal(expectedPositions, brush.InterpolationColors.Positions); 557Assert.Equal(1, brush.InterpolationColors.Positions.Length); 559Assert.Equal(1, brush.InterpolationColors.Positions.Length); 948Assert.Equal([0], brush.InterpolationColors.Positions);