21 writes to Factors
System.Drawing.Common.Tests (21)
System\Drawing\Drawing2D\BlendTests.cs (2)
41
Blend blend = new() {
Factors
= null };
44
blend.
Factors
= new float[10];
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (7)
283
Factors
= factors,
302
Factors
= factors,
319
Assert.Throws<ArgumentNullException>(() => brush.Blend = new Blend {
Factors
= null });
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 = [] });
522
Factors
= new float[1],
System\Drawing\Drawing2D\PathGradientBrushTests.cs (12)
257
brush.Blend = new Blend {
Factors
= factors, Positions = positions };
276
brush.Blend.
Factors
= [];
278
brush.Blend.
Factors
= 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 });
46 references to Factors
System.Drawing.Common.Tests (46)
System\Drawing\Drawing2D\BlendTests.cs (4)
12
Assert.Equal(new float[1], blend.
Factors
);
22
Assert.Equal(new float[count], blend.
Factors
);
42
Assert.Null(blend.
Factors
);
45
Assert.Equal(new float[10], blend.
Factors
);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (14)
25
Assert.Equal([1], brush.Blend.
Factors
);
52
Assert.Equal([1], brush.Blend.
Factors
);
86
Assert.Equal([1], brush.Blend.
Factors
);
103
Assert.Equal([1], brush.Blend.
Factors
);
129
Assert.Equal([1], brush.Blend.
Factors
);
146
Assert.Equal([1], brush.Blend.
Factors
);
172
Assert.Equal([1], brush.Blend.
Factors
);
189
Assert.Equal([1], brush.Blend.
Factors
);
239
Assert.Equal(brush.Blend.
Factors
, clone.Blend.
Factors
);
288
Assert.Equal(blend.
Factors
, brush.Blend.
Factors
);
937
Assert.Equal(expectedFactors, brush.Blend.
Factors
);
951
Assert.Equal(expectedFactors, brush.Blend.
Factors
);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (28)
258
Assert.Equal(factors, brush.Blend.
Factors
);
262
Assert.Equal(factors, brush.Blend.
Factors
);
267
Assert.Equal(factors, brush.Blend.
Factors
);
277
Assert.Equal(1, brush.Blend.
Factors
.Length);
279
Assert.Equal(1, brush.Blend.
Factors
.Length);
352
Assert.Equal(defaultScale, brush.Blend.
Factors
[0]);
354
Assert.Equal(0f, brush.Blend.
Factors
[^1]);
359
Assert.Equal(0f, brush.Blend.
Factors
[0]);
361
Assert.Equal(defaultScale, brush.Blend.
Factors
[^1]);
366
Assert.Equal(0f, brush.Blend.
Factors
[0]);
368
Assert.Equal(0f, brush.Blend.
Factors
[^1]);
384
Assert.Equal(256, brush.Blend.
Factors
.Length);
386
Assert.Equal(1f, brush.Blend.
Factors
[0]);
388
Assert.Equal(0f, brush.Blend.
Factors
[^1]);
393
Assert.Equal(256, brush.Blend.
Factors
.Length);
395
Assert.Equal(0f, brush.Blend.
Factors
[0]);
397
Assert.Equal(1f, brush.Blend.
Factors
[^1]);
402
Assert.Equal(511, brush.Blend.
Factors
.Length);
404
Assert.Equal(0f, brush.Blend.
Factors
[0]);
406
Assert.Equal(1f, brush.Blend.
Factors
[255]);
408
Assert.Equal(0f, brush.Blend.
Factors
[^1]);
454
Assert.Equal([defaultScale, 0f], brush.Blend.
Factors
);
459
Assert.Equal([0f, defaultScale], brush.Blend.
Factors
);
464
Assert.Equal([0f, defaultScale, 0f], brush.Blend.
Factors
);
481
Assert.Equal([1f, 0f], brush.Blend.
Factors
);
486
Assert.Equal([0f, 1f], brush.Blend.
Factors
);
491
Assert.Equal([0f, 1f, 0f], brush.Blend.
Factors
);
943
Assert.Equal([1], brush.Blend.
Factors
);