107 references to WrapMode
System.Drawing (1)
System.Drawing.cs (1)
55
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Drawing2D.
WrapMode
))]
System.Drawing.Common (11)
Special\NotSupported.cs (11)
1333
public TextureBrush(System.Drawing.Image image, System.Drawing.Drawing2D.
WrapMode
wrapMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1334
public TextureBrush(System.Drawing.Image image, System.Drawing.Drawing2D.
WrapMode
wrapMode, System.Drawing.Rectangle dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1335
public TextureBrush(System.Drawing.Image image, System.Drawing.Drawing2D.
WrapMode
wrapMode, System.Drawing.RectangleF dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1342
public System.Drawing.Drawing2D.
WrapMode
WrapMode { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1720
public System.Drawing.Drawing2D.
WrapMode
WrapMode { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
1822
public PathGradientBrush(System.Drawing.PointF[] points, System.Drawing.Drawing2D.
WrapMode
wrapMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1824
public PathGradientBrush(System.Drawing.Point[] points, System.Drawing.Drawing2D.
WrapMode
wrapMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1833
public System.Drawing.Drawing2D.
WrapMode
WrapMode { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
2446
public void SetWrapMode(System.Drawing.Drawing2D.
WrapMode
mode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2447
public void SetWrapMode(System.Drawing.Drawing2D.
WrapMode
mode, System.Drawing.Color color) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
2448
public void SetWrapMode(System.Drawing.Drawing2D.
WrapMode
mode, System.Drawing.Color color, bool clamp) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (91)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (18)
34
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
61
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
95
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
112
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
138
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
155
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
181
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
198
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
602
[InlineData(
WrapMode
.Tile)]
603
[InlineData(
WrapMode
.TileFlipX)]
604
[InlineData(
WrapMode
.TileFlipXY)]
605
[InlineData(
WrapMode
.TileFlipY)]
606
public void WrapMode_SetValid_GetReturnsExpected(
WrapMode
wrapMode)
613
[InlineData(
WrapMode
.Tile - 1)]
614
[InlineData(
WrapMode
.Clamp + 1)]
615
public void WrapMode_SetInvalid_ThrowsInvalidEnumArgumentException(
WrapMode
wrapMode)
625
AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode =
WrapMode
.Clamp);
635
AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode =
WrapMode
.TileFlipX);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (19)
42
Assert.Equal(
WrapMode
.Clamp, bi.WrapMode);
44
Assert.Equal(
WrapMode
.Clamp, bf.WrapMode);
49
yield return new object[] {
WrapMode
.Clamp };
50
yield return new object[] {
WrapMode
.Tile };
51
yield return new object[] {
WrapMode
.TileFlipX };
52
yield return new object[] {
WrapMode
.TileFlipXY };
53
yield return new object[] {
WrapMode
.TileFlipY };
58
public void Ctor_PointsWrapMode_ReturnsExpected(
WrapMode
wrapMode)
81
Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength],
WrapMode
.Clamp));
83
Assert.Throws<ArgumentException>(() => new PathGradientBrush(new PointF[pointsLength],
WrapMode
.Clamp));
90
new PathGradientBrush(_defaultIntPoints, (
WrapMode
)int.MaxValue));
93
new PathGradientBrush(_defaultFloatPoints, (
WrapMode
)int.MaxValue));
102
Assert.Equal(
WrapMode
.Clamp, brush.WrapMode);
127
Assert.Equal(
WrapMode
.Clamp, clone.WrapMode);
224
using PathGradientBrush brush = new(_defaultFloatPoints,
WrapMode
.TileFlipXY);
258
using PathGradientBrush brush = new(_defaultFloatPoints,
WrapMode
.TileFlipXY);
277
using PathGradientBrush brush = new(_defaultFloatPoints,
WrapMode
.TileFlipXY);
919
public void WrapMode_ReturnsExpected(
WrapMode
wrapMode)
939
Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = (
WrapMode
)int.MinValue);
System\Drawing\Imaging\ImageAttributesTests.cs (3)
1297
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(
WrapMode
.Clamp));
1298
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(
WrapMode
.Clamp, Color.Black));
1299
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(
WrapMode
.Clamp, Color.Black, true));
System\Drawing\TextureBrushTests.cs (51)
31
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
51
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Clamp, data[1], data[2] };
52
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Tile, data[1], data[2] };
53
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipX, data[1], data[2] };
54
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipXY, data[1], data[2] };
55
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipY, data[1], data[2] };
61
public void Ctor_Image_WrapMode(Image image,
WrapMode
wrapMode, PixelFormat expectedPixelFormat, Size expectedSize)
99
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
120
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
132
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Clamp, data[1] };
133
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Tile, data[1] };
134
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipX, data[1] };
135
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipXY, data[1] };
136
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipY, data[1] };
142
public void Ctor_Image_WrapMode_Rectangle(Image image,
WrapMode
wrapMode, Rectangle rectangle)
163
public void Ctor_Image_WrapMode_RectangleF(Image image,
WrapMode
wrapMode, Rectangle rectangle)
186
yield return new object[] { ((Image)data[0]).Clone(), data[1], null,
WrapMode
.Tile };
187
yield return new object[] { ((Image)data[0]).Clone(), data[1], new ImageAttributes(),
WrapMode
.Clamp };
190
customWrapMode.SetWrapMode(
WrapMode
.TileFlipXY);
191
yield return new object[] { ((Image)data[0]).Clone(), data[1], customWrapMode,
WrapMode
.TileFlipXY };
197
public void Ctor_Image_Rectangle_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes,
WrapMode
expectedWrapMode)
219
public void Ctor_Image_RectangleF_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes,
WrapMode
expectedWrapMode)
243
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
WrapMode
.Tile));
248
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
WrapMode
.Tile, RectangleF.Empty));
249
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
WrapMode
.Tile, Rectangle.Empty));
259
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
WrapMode
.Tile));
264
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
WrapMode
.Tile, RectangleF.Empty));
265
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
WrapMode
.Tile, Rectangle.Empty));
269
[InlineData(
WrapMode
.Tile - 1)]
270
[InlineData(
WrapMode
.Clamp + 1)]
271
public void Ctor_InvalidWrapMode_ThrowsInvalidEnumArgumentException(
WrapMode
wrapMode)
294
Assert.Throws<ExternalException>(() => new TextureBrush(image,
WrapMode
.Tile, rectangle));
295
Assert.Throws<ExternalException>(() => new TextureBrush(image,
WrapMode
.Tile, (RectangleF)rectangle));
304
using TextureBrush brush = new(image,
WrapMode
.Clamp);
309
Assert.Equal(
WrapMode
.Clamp, clone.WrapMode);
689
[InlineData(
WrapMode
.Clamp)]
690
[InlineData(
WrapMode
.Tile)]
691
[InlineData(
WrapMode
.TileFlipX)]
692
[InlineData(
WrapMode
.TileFlipXY)]
693
[InlineData(
WrapMode
.TileFlipY)]
694
public void WrapMode_SetValid_GetReturnsExpected(
WrapMode
wrapMode)
703
[InlineData(
WrapMode
.Tile - 1)]
704
[InlineData(
WrapMode
.Clamp + 1)]
705
public void WrapMode_SetInvalid_ThrowsInvalidEnumArgumentException(
WrapMode
wrapMode)
720
AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode =
WrapMode
.Tile);
731
VerifyFillRect(
WrapMode
.Clamp,
747
VerifyFillRect(
WrapMode
.Tile,
763
VerifyFillRect(
WrapMode
.TileFlipX,
779
VerifyFillRect(
WrapMode
.TileFlipY,
795
VerifyFillRect(
WrapMode
.TileFlipXY,
804
private static void VerifyFillRect(
WrapMode
wrapMode, Color[][] expectedColors)
System.Windows.Forms (4)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
831
attr.SetWrapMode(
WrapMode
.TileFlipXY);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1556
using TextureBrush textureBrush = new(BackgroundImage,
WrapMode
.Tile);
System\Windows\Forms\Rendering\ControlPaint.cs (2)
425
using TextureBrush textureBrush = new(backgroundImage,
WrapMode
.Tile);
504
imageAttrib.SetWrapMode(
WrapMode
.TileFlipXY);