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)
34Assert.Equal(WrapMode.Tile, brush.WrapMode); 61Assert.Equal(WrapMode.Tile, brush.WrapMode); 95Assert.Equal(WrapMode.Tile, brush.WrapMode); 112Assert.Equal(WrapMode.Tile, brush.WrapMode); 138Assert.Equal(WrapMode.Tile, brush.WrapMode); 155Assert.Equal(WrapMode.Tile, brush.WrapMode); 181Assert.Equal(WrapMode.Tile, brush.WrapMode); 198Assert.Equal(WrapMode.Tile, brush.WrapMode); 602[InlineData(WrapMode.Tile)] 603[InlineData(WrapMode.TileFlipX)] 604[InlineData(WrapMode.TileFlipXY)] 605[InlineData(WrapMode.TileFlipY)] 606public void WrapMode_SetValid_GetReturnsExpected(WrapMode wrapMode) 613[InlineData(WrapMode.Tile - 1)] 614[InlineData(WrapMode.Clamp + 1)] 615public void WrapMode_SetInvalid_ThrowsInvalidEnumArgumentException(WrapMode wrapMode) 625AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.Clamp); 635AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.TileFlipX);
System\Drawing\Drawing2D\PathGradientBrushTests.cs (19)
42Assert.Equal(WrapMode.Clamp, bi.WrapMode); 44Assert.Equal(WrapMode.Clamp, bf.WrapMode); 49yield return new object[] { WrapMode.Clamp }; 50yield return new object[] { WrapMode.Tile }; 51yield return new object[] { WrapMode.TileFlipX }; 52yield return new object[] { WrapMode.TileFlipXY }; 53yield return new object[] { WrapMode.TileFlipY }; 58public void Ctor_PointsWrapMode_ReturnsExpected(WrapMode wrapMode) 81Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength], WrapMode.Clamp)); 83Assert.Throws<ArgumentException>(() => new PathGradientBrush(new PointF[pointsLength], WrapMode.Clamp)); 90new PathGradientBrush(_defaultIntPoints, (WrapMode)int.MaxValue)); 93new PathGradientBrush(_defaultFloatPoints, (WrapMode)int.MaxValue)); 102Assert.Equal(WrapMode.Clamp, brush.WrapMode); 127Assert.Equal(WrapMode.Clamp, clone.WrapMode); 224using PathGradientBrush brush = new(_defaultFloatPoints, WrapMode.TileFlipXY); 258using PathGradientBrush brush = new(_defaultFloatPoints, WrapMode.TileFlipXY); 277using PathGradientBrush brush = new(_defaultFloatPoints, WrapMode.TileFlipXY); 919public void WrapMode_ReturnsExpected(WrapMode wrapMode) 939Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = (WrapMode)int.MinValue);
System\Drawing\Imaging\ImageAttributesTests.cs (3)
1297AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp)); 1298AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black)); 1299AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black, true));
System\Drawing\TextureBrushTests.cs (51)
31Assert.Equal(WrapMode.Tile, brush.WrapMode); 51yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Clamp, data[1], data[2] }; 52yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Tile, data[1], data[2] }; 53yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipX, data[1], data[2] }; 54yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipXY, data[1], data[2] }; 55yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipY, data[1], data[2] }; 61public void Ctor_Image_WrapMode(Image image, WrapMode wrapMode, PixelFormat expectedPixelFormat, Size expectedSize) 99Assert.Equal(WrapMode.Tile, brush.WrapMode); 120Assert.Equal(WrapMode.Tile, brush.WrapMode); 132yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Clamp, data[1] }; 133yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Tile, data[1] }; 134yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipX, data[1] }; 135yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipXY, data[1] }; 136yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipY, data[1] }; 142public void Ctor_Image_WrapMode_Rectangle(Image image, WrapMode wrapMode, Rectangle rectangle) 163public void Ctor_Image_WrapMode_RectangleF(Image image, WrapMode wrapMode, Rectangle rectangle) 186yield return new object[] { ((Image)data[0]).Clone(), data[1], null, WrapMode.Tile }; 187yield return new object[] { ((Image)data[0]).Clone(), data[1], new ImageAttributes(), WrapMode.Clamp }; 190customWrapMode.SetWrapMode(WrapMode.TileFlipXY); 191yield return new object[] { ((Image)data[0]).Clone(), data[1], customWrapMode, WrapMode.TileFlipXY }; 197public void Ctor_Image_Rectangle_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes, WrapMode expectedWrapMode) 219public void Ctor_Image_RectangleF_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes, WrapMode expectedWrapMode) 243AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile)); 248AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, RectangleF.Empty)); 249AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, Rectangle.Empty)); 259AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile)); 264AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, RectangleF.Empty)); 265AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, Rectangle.Empty)); 269[InlineData(WrapMode.Tile - 1)] 270[InlineData(WrapMode.Clamp + 1)] 271public void Ctor_InvalidWrapMode_ThrowsInvalidEnumArgumentException(WrapMode wrapMode) 294Assert.Throws<ExternalException>(() => new TextureBrush(image, WrapMode.Tile, rectangle)); 295Assert.Throws<ExternalException>(() => new TextureBrush(image, WrapMode.Tile, (RectangleF)rectangle)); 304using TextureBrush brush = new(image, WrapMode.Clamp); 309Assert.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)] 694public void WrapMode_SetValid_GetReturnsExpected(WrapMode wrapMode) 703[InlineData(WrapMode.Tile - 1)] 704[InlineData(WrapMode.Clamp + 1)] 705public void WrapMode_SetInvalid_ThrowsInvalidEnumArgumentException(WrapMode wrapMode) 720AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.Tile); 731VerifyFillRect(WrapMode.Clamp, 747VerifyFillRect(WrapMode.Tile, 763VerifyFillRect(WrapMode.TileFlipX, 779VerifyFillRect(WrapMode.TileFlipY, 795VerifyFillRect(WrapMode.TileFlipXY, 804private 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)
425using TextureBrush textureBrush = new(backgroundImage, WrapMode.Tile); 504imageAttrib.SetWrapMode(WrapMode.TileFlipXY);