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)
32
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
59
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
93
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
110
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
136
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
153
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
179
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
196
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
600
[InlineData(
WrapMode
.Tile)]
601
[InlineData(
WrapMode
.TileFlipX)]
602
[InlineData(
WrapMode
.TileFlipXY)]
603
[InlineData(
WrapMode
.TileFlipY)]
604
public void WrapMode_SetValid_GetReturnsExpected(
WrapMode
wrapMode)
611
[InlineData(
WrapMode
.Tile - 1)]
612
[InlineData(
WrapMode
.Clamp + 1)]
613
public void WrapMode_SetInvalid_ThrowsInvalidEnumArgumentException(
WrapMode
wrapMode)
623
AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode =
WrapMode
.Clamp);
633
AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode =
WrapMode
.TileFlipX);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (19)
40
Assert.Equal(
WrapMode
.Clamp, bi.WrapMode);
42
Assert.Equal(
WrapMode
.Clamp, bf.WrapMode);
47
yield return new object[] {
WrapMode
.Clamp };
48
yield return new object[] {
WrapMode
.Tile };
49
yield return new object[] {
WrapMode
.TileFlipX };
50
yield return new object[] {
WrapMode
.TileFlipXY };
51
yield return new object[] {
WrapMode
.TileFlipY };
56
public void Ctor_PointsWrapMode_ReturnsExpected(
WrapMode
wrapMode)
79
Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength],
WrapMode
.Clamp));
81
Assert.Throws<ArgumentException>(() => new PathGradientBrush(new PointF[pointsLength],
WrapMode
.Clamp));
88
new PathGradientBrush(_defaultIntPoints, (
WrapMode
)int.MaxValue));
91
new PathGradientBrush(_defaultFloatPoints, (
WrapMode
)int.MaxValue));
100
Assert.Equal(
WrapMode
.Clamp, brush.WrapMode);
125
Assert.Equal(
WrapMode
.Clamp, clone.WrapMode);
222
using PathGradientBrush brush = new(_defaultFloatPoints,
WrapMode
.TileFlipXY);
256
using PathGradientBrush brush = new(_defaultFloatPoints,
WrapMode
.TileFlipXY);
275
using PathGradientBrush brush = new(_defaultFloatPoints,
WrapMode
.TileFlipXY);
917
public void WrapMode_ReturnsExpected(
WrapMode
wrapMode)
937
Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = (
WrapMode
)int.MinValue);
System\Drawing\Imaging\ImageAttributesTests.cs (3)
1296
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(
WrapMode
.Clamp));
1297
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(
WrapMode
.Clamp, Color.Black));
1298
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(
WrapMode
.Clamp, Color.Black, true));
System\Drawing\TextureBrushTests.cs (51)
30
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
50
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Clamp, data[1], data[2] };
51
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Tile, data[1], data[2] };
52
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipX, data[1], data[2] };
53
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipXY, data[1], data[2] };
54
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipY, data[1], data[2] };
60
public void Ctor_Image_WrapMode(Image image,
WrapMode
wrapMode, PixelFormat expectedPixelFormat, Size expectedSize)
98
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
119
Assert.Equal(
WrapMode
.Tile, brush.WrapMode);
131
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Clamp, data[1] };
132
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.Tile, data[1] };
133
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipX, data[1] };
134
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipXY, data[1] };
135
yield return new object[] { ((Image)data[0]).Clone(),
WrapMode
.TileFlipY, data[1] };
141
public void Ctor_Image_WrapMode_Rectangle(Image image,
WrapMode
wrapMode, Rectangle rectangle)
162
public void Ctor_Image_WrapMode_RectangleF(Image image,
WrapMode
wrapMode, Rectangle rectangle)
185
yield return new object[] { ((Image)data[0]).Clone(), data[1], null,
WrapMode
.Tile };
186
yield return new object[] { ((Image)data[0]).Clone(), data[1], new ImageAttributes(),
WrapMode
.Clamp };
189
customWrapMode.SetWrapMode(
WrapMode
.TileFlipXY);
190
yield return new object[] { ((Image)data[0]).Clone(), data[1], customWrapMode,
WrapMode
.TileFlipXY };
196
public void Ctor_Image_Rectangle_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes,
WrapMode
expectedWrapMode)
218
public void Ctor_Image_RectangleF_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes,
WrapMode
expectedWrapMode)
242
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
WrapMode
.Tile));
247
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
WrapMode
.Tile, RectangleF.Empty));
248
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
WrapMode
.Tile, Rectangle.Empty));
258
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
WrapMode
.Tile));
263
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
WrapMode
.Tile, RectangleF.Empty));
264
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
WrapMode
.Tile, Rectangle.Empty));
268
[InlineData(
WrapMode
.Tile - 1)]
269
[InlineData(
WrapMode
.Clamp + 1)]
270
public void Ctor_InvalidWrapMode_ThrowsInvalidEnumArgumentException(
WrapMode
wrapMode)
293
Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image,
WrapMode
.Tile, rectangle));
294
Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image,
WrapMode
.Tile, (RectangleF)rectangle));
303
using TextureBrush brush = new(image,
WrapMode
.Clamp);
308
Assert.Equal(
WrapMode
.Clamp, clone.WrapMode);
688
[InlineData(
WrapMode
.Clamp)]
689
[InlineData(
WrapMode
.Tile)]
690
[InlineData(
WrapMode
.TileFlipX)]
691
[InlineData(
WrapMode
.TileFlipXY)]
692
[InlineData(
WrapMode
.TileFlipY)]
693
public void WrapMode_SetValid_GetReturnsExpected(
WrapMode
wrapMode)
702
[InlineData(
WrapMode
.Tile - 1)]
703
[InlineData(
WrapMode
.Clamp + 1)]
704
public void WrapMode_SetInvalid_ThrowsInvalidEnumArgumentException(
WrapMode
wrapMode)
719
AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode =
WrapMode
.Tile);
730
VerifyFillRect(
WrapMode
.Clamp,
746
VerifyFillRect(
WrapMode
.Tile,
762
VerifyFillRect(
WrapMode
.TileFlipX,
778
VerifyFillRect(
WrapMode
.TileFlipY,
794
VerifyFillRect(
WrapMode
.TileFlipXY,
803
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)
428
using TextureBrush textureBrush = new(backgroundImage,
WrapMode
.Tile);
507
imageAttrib.SetWrapMode(
WrapMode
.TileFlipXY);