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