System\Drawing\RegionTests.cs (79)
45Assert.False(region.IsEmpty(s_graphic));
46Assert.True(region.IsInfinite(s_graphic));
47Assert.Equal(new RectangleF(-4194304, -4194304, 8388608, 8388608), region.GetBounds(s_graphic));
59Assert.Equal(isEmpty, region.IsEmpty(s_graphic));
60Assert.False(region.IsInfinite(s_graphic));
61Assert.Equal(new RectangleF(x, y, width, height), region.GetBounds(s_graphic));
75Assert.Equal(isEmpty, region.IsEmpty(s_graphic));
76Assert.False(region.IsInfinite(s_graphic));
77Assert.Equal(rectangle, region.GetBounds(s_graphic));
95Assert.Equal(region.GetBounds(s_graphic), otherRegion.GetBounds(s_graphic));
178Assert.Equal(new RectangleF(1, 2, 9, 10), region.GetBounds(s_graphic));
187Assert.True(region.IsEmpty(s_graphic));
227Assert.Equal(isInfinite, region.IsInfinite(s_graphic));
267Assert.Equal(region.GetBounds(s_graphic), clone.GetBounds(s_graphic));
376Assert.False(region.IsEmpty(s_graphic));
377Assert.False(region.IsInfinite(s_graphic));
502Assert.True(region.IsEmpty(s_graphic));
584Assert.Equal(expected, region.Equals(other, s_graphic));
592AssertExtensions.Throws<ArgumentNullException>("region", () => region.Equals(null, s_graphic));
618AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Equals(new Region(), s_graphic));
619AssertExtensions.Throws<ArgumentException>(null, () => new Region().Equals(disposedRegion, s_graphic));
885Assert.True(region.IsInfinite(s_graphic));
912IntPtr handle1 = region.GetHrgn(s_graphic);
913IntPtr handle2 = region.GetHrgn(s_graphic);
918IntPtr handle3 = newRegion.GetHrgn(s_graphic);
920Assert.Equal(new RectangleF(1, 2, 3, 4), newRegion.GetBounds(s_graphic));
937IntPtr handle = region.GetHrgn(s_graphic);
942Assert.Equal(IntPtr.Zero, region.GetHrgn(s_graphic));
949Assert.Equal(IntPtr.Zero, region.GetHrgn(s_graphic));
952IntPtr handle = region.GetHrgn(s_graphic);
967AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetHrgn(s_graphic));
997AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetBounds(s_graphic));
1050Assert.False(clipRegion.IsEmpty(s_graphic));
1051Assert.False(clipRegion.IsInfinite(s_graphic));
1185Assert.False(region.IsEmpty(s_graphic));
1186Assert.False(region.IsInfinite(s_graphic));
1213Assert.False(region.IsEmpty(s_graphic));
1214Assert.False(region.IsInfinite(s_graphic));
1242Assert.True(region.IsEmpty(s_graphic));
1275AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().IsEmpty(s_graphic));
1298AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().IsInfinite(s_graphic));
1335Assert.Equal(expected, region.IsVisible(rectangle, s_graphic));
1338Assert.Equal(expected, region.IsVisible((RectangleF)rectangle, s_graphic));
1344Assert.Equal(expected, region.IsVisible(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, s_graphic));
1347Assert.Equal(expected, region.IsVisible((float)rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, s_graphic));
1389Assert.Equal(expected, region.IsVisible(point, s_graphic));
1392Assert.Equal(expected, region.IsVisible((PointF)point, s_graphic));
1397Assert.Equal(expected, region.IsVisible(point.X, point.Y, s_graphic));
1401Assert.Equal(expected, region.IsVisible(point.X, point.Y, s_graphic));
1404Assert.Equal(expected, region.IsVisible((float)point.X, point.Y, s_graphic));
1419AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, s_graphic));
1420AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new PointF(1, 2), s_graphic));
1421AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2), s_graphic));
1427AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, 3f, 4f, s_graphic));
1428AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4), s_graphic));
1429AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4), s_graphic));
1431AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, s_graphic));
1433AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, 3, 4, s_graphic));
1443Assert.True(region.IsEmpty(s_graphic));
1444Assert.False(region.IsInfinite(s_graphic));
1445Assert.Equal(RectangleF.Empty, region.GetBounds(s_graphic));
1453Assert.True(region.IsEmpty(s_graphic));
1470Assert.False(region.IsEmpty(s_graphic));
1471Assert.True(region.IsInfinite(s_graphic));
1472Assert.Equal(new RectangleF(-4194304, -4194304, 8388608, 8388608), region.GetBounds(s_graphic));
1475Assert.False(region.IsEmpty(s_graphic));
1476Assert.True(region.IsInfinite(s_graphic));
1781Assert.True(region.IsInfinite(s_graphic));
1841Assert.True(region.IsInfinite(s_graphic));
1855Assert.False(region.IsInfinite(s_graphic));
1868Assert.False(region.IsInfinite(s_graphic));
1906Assert.False(region.IsInfinite(s_graphic));
1929Assert.False(region.IsInfinite(s_graphic));
1941Assert.True(region.IsInfinite(s_graphic));
1957Assert.True(region.IsEmpty(s_graphic));
1958Assert.False(region.IsInfinite(s_graphic));
2139Assert.True(region.IsInfinite(s_graphic));