20 writes to Positions
System.Drawing.Common.Tests (20)
System\Drawing\Drawing2D\BlendTests.cs (2)
51
Blend blend = new() {
Positions
= null };
54
blend.
Positions
= new float[10];
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (6)
284
Positions
= positions
303
Positions
= positions
326
AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () => brush.Blend = new Blend { Factors = new float[2],
Positions
= null });
333
AssertExtensions.Throws<ArgumentException>("value", null, () => brush.Blend = new Blend { Factors = new float[2],
Positions
= new float[1] });
340
AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = new Blend { Factors = [],
Positions
= [] });
523
Positions
= new float[1]
System\Drawing\Drawing2D\PathGradientBrushTests.cs (12)
257
brush.Blend = new Blend { Factors = factors,
Positions
= positions };
280
brush.Blend.
Positions
= [];
282
brush.Blend.
Positions
= new float[2];
297
yield return new object[] { new Blend() { Factors = [],
Positions
= [] } };
298
yield return new object[] { new Blend() { Factors = new float[2],
Positions
= [1, 1] } };
299
yield return new object[] { new Blend() { Factors = new float[2],
Positions
= [0, 5] } };
300
yield return new object[] { new Blend() { Factors = new float[3],
Positions
= [0, 1, 5] } };
301
yield return new object[] { new Blend() { Factors = new float[3],
Positions
= [1, 1, 1] } };
315
Blend invalidBlend = new () { Factors = new float[2],
Positions
= new float[1] };
326
Assert.Throws<ArgumentNullException>(() => brush.Blend = new Blend() { Factors = null,
Positions
= null });
327
Assert.Throws<ArgumentNullException>(() => brush.Blend = new Blend() { Factors = null,
Positions
= [] });
335
brush.Blend = new Blend() { Factors = [],
Positions
= null });
45 references to Positions
System.Drawing.Common.Tests (45)
System\Drawing\Drawing2D\BlendTests.cs (4)
13
Assert.Equal(new float[1], blend.
Positions
);
23
Assert.Equal(new float[count], blend.
Positions
);
52
Assert.Null(blend.
Positions
);
55
Assert.Equal(new float[10], blend.
Positions
);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (13)
26
Assert.Equal(1, brush.Blend.
Positions
.Length);
53
Assert.Equal(1, brush.Blend.
Positions
.Length);
87
Assert.Equal(1, brush.Blend.
Positions
.Length);
104
Assert.Equal(1, brush.Blend.
Positions
.Length);
130
Assert.Equal(1, brush.Blend.
Positions
.Length);
147
Assert.Equal(1, brush.Blend.
Positions
.Length);
173
Assert.Equal(1, brush.Blend.
Positions
.Length);
190
Assert.Equal(1, brush.Blend.
Positions
.Length);
240
Assert.Equal(brush.Blend.
Positions
.Length, clone.Blend.
Positions
.Length);
289
Assert.Equal(factors.Length, brush.Blend.
Positions
.Length);
938
Assert.Equal(expectedPositions, brush.Blend.
Positions
);
952
Assert.Equal(expectedPositions, brush.Blend.
Positions
);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (28)
259
Assert.Equal(expectedSize, brush.Blend.
Positions
.Length);
263
Assert.Equal(positions, brush.Blend.
Positions
);
268
Assert.Equal(1, brush.Blend.
Positions
.Length);
281
Assert.Equal(1, brush.Blend.
Positions
.Length);
283
Assert.Equal(1, brush.Blend.
Positions
.Length);
351
Assert.Equal(focus, brush.Blend.
Positions
[0]);
353
Assert.Equal(1f, brush.Blend.
Positions
[^1]);
358
Assert.Equal(0f, brush.Blend.
Positions
[0]);
360
Assert.Equal(focus, brush.Blend.
Positions
[^1]);
365
Assert.Equal(0f, brush.Blend.
Positions
[0]);
367
Assert.Equal(1f, brush.Blend.
Positions
[^1]);
383
Assert.Equal(256, brush.Blend.
Positions
.Length);
385
Assert.Equal(focus, brush.Blend.
Positions
[0]);
387
Assert.Equal(1f, brush.Blend.
Positions
[^1]);
392
Assert.Equal(256, brush.Blend.
Positions
.Length);
394
Assert.Equal(0f, brush.Blend.
Positions
[0]);
396
Assert.Equal(focus, brush.Blend.
Positions
[^1]);
401
Assert.Equal(511, brush.Blend.
Positions
.Length);
403
Assert.Equal(0f, brush.Blend.
Positions
[0]);
405
Assert.Equal(focus, brush.Blend.
Positions
[255]);
407
Assert.Equal(1f, brush.Blend.
Positions
[^1]);
455
Assert.Equal([focus, 1f], brush.Blend.
Positions
);
460
Assert.Equal([0f, focus], brush.Blend.
Positions
);
465
Assert.Equal([0f, focus, 1f], brush.Blend.
Positions
);
482
Assert.Equal([focus, 1f], brush.Blend.
Positions
);
487
Assert.Equal([0f, focus], brush.Blend.
Positions
);
492
Assert.Equal([0f, focus, 1f], brush.Blend.
Positions
);
944
Assert.Equal(1, brush.Blend.
Positions
.Length);