7 writes to Blend
System.Drawing.Common.Tests (7)
System\Drawing\Drawing2D\PathGradientBrushTests.cs (7)
257
brush.
Blend
= new Blend { Factors = factors, Positions = positions };
309
AssertExtensions.Throws<ArgumentException>(null, () => brush.
Blend
= blend);
318
AssertExtensions.Throws<ArgumentException>("value", null, () => brush.
Blend
= invalidBlend);
325
Assert.Throws<ArgumentNullException>(() => brush.
Blend
= null);
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 });
61 references to Blend
System.Drawing.Common.Tests (61)
System\Drawing\Drawing2D\PathGradientBrushTests.cs (61)
258
Assert.Equal(factors, brush.
Blend
.Factors);
259
Assert.Equal(expectedSize, brush.
Blend
.Positions.Length);
262
Assert.Equal(factors, brush.
Blend
.Factors);
263
Assert.Equal(positions, brush.
Blend
.Positions);
267
Assert.Equal(factors, brush.
Blend
.Factors);
268
Assert.Single(brush.
Blend
.Positions);
276
brush.
Blend
.Factors = [];
277
Assert.Single(brush.
Blend
.Factors);
278
brush.
Blend
.Factors = new float[2];
279
Assert.Single(brush.
Blend
.Factors);
280
brush.
Blend
.Positions = [];
281
Assert.Single(brush.
Blend
.Positions);
282
brush.
Blend
.Positions = new float[2];
283
Assert.Single(brush.
Blend
.Positions);
292
AssertExtensions.Throws<ArgumentException>(null, () => brush.
Blend
);
351
Assert.Equal(focus, brush.
Blend
.Positions[0]);
352
Assert.Equal(defaultScale, brush.
Blend
.Factors[0]);
353
Assert.Equal(1f, brush.
Blend
.Positions[^1]);
354
Assert.Equal(0f, brush.
Blend
.Factors[^1]);
358
Assert.Equal(0f, brush.
Blend
.Positions[0]);
359
Assert.Equal(0f, brush.
Blend
.Factors[0]);
360
Assert.Equal(focus, brush.
Blend
.Positions[^1]);
361
Assert.Equal(defaultScale, brush.
Blend
.Factors[^1]);
365
Assert.Equal(0f, brush.
Blend
.Positions[0]);
366
Assert.Equal(0f, brush.
Blend
.Factors[0]);
367
Assert.Equal(1f, brush.
Blend
.Positions[^1]);
368
Assert.Equal(0f, brush.
Blend
.Factors[^1]);
383
Assert.Equal(256, brush.
Blend
.Positions.Length);
384
Assert.Equal(256, brush.
Blend
.Factors.Length);
385
Assert.Equal(focus, brush.
Blend
.Positions[0]);
386
Assert.Equal(1f, brush.
Blend
.Factors[0]);
387
Assert.Equal(1f, brush.
Blend
.Positions[^1]);
388
Assert.Equal(0f, brush.
Blend
.Factors[^1]);
392
Assert.Equal(256, brush.
Blend
.Positions.Length);
393
Assert.Equal(256, brush.
Blend
.Factors.Length);
394
Assert.Equal(0f, brush.
Blend
.Positions[0]);
395
Assert.Equal(0f, brush.
Blend
.Factors[0]);
396
Assert.Equal(focus, brush.
Blend
.Positions[^1]);
397
Assert.Equal(1f, brush.
Blend
.Factors[^1]);
401
Assert.Equal(511, brush.
Blend
.Positions.Length);
402
Assert.Equal(511, brush.
Blend
.Factors.Length);
403
Assert.Equal(0f, brush.
Blend
.Positions[0]);
404
Assert.Equal(0f, brush.
Blend
.Factors[0]);
405
Assert.Equal(focus, brush.
Blend
.Positions[255]);
406
Assert.Equal(1f, brush.
Blend
.Factors[255]);
407
Assert.Equal(1f, brush.
Blend
.Positions[^1]);
408
Assert.Equal(0f, brush.
Blend
.Factors[^1]);
454
Assert.Equal([defaultScale, 0f], brush.
Blend
.Factors);
455
Assert.Equal([focus, 1f], brush.
Blend
.Positions);
459
Assert.Equal([0f, defaultScale], brush.
Blend
.Factors);
460
Assert.Equal([0f, focus], brush.
Blend
.Positions);
464
Assert.Equal([0f, defaultScale, 0f], brush.
Blend
.Factors);
465
Assert.Equal([0f, focus, 1f], brush.
Blend
.Positions);
481
Assert.Equal([1f, 0f], brush.
Blend
.Factors);
482
Assert.Equal([focus, 1f], brush.
Blend
.Positions);
486
Assert.Equal([0f, 1f], brush.
Blend
.Factors);
487
Assert.Equal([0f, focus], brush.
Blend
.Positions);
491
Assert.Equal([0f, 1f, 0f], brush.
Blend
.Factors);
492
Assert.Equal([0f, focus, 1f], brush.
Blend
.Positions);
943
Assert.Equal([1], brush.
Blend
.Factors);
944
Assert.Single(brush.
Blend
.Positions);