342 instantiations of Region
System.Drawing.Common.Tests (257)
mono\System.Drawing\GraphicsTests.cs (28)
105
using Region r =
new
();
152
g.Clip = new
Region
(new Rectangle(50, 40, 210, 220));
178
g.Clip = new
Region
(new RectangleF(10, 10, 100, 100));
205
g.Clip = new
Region
(new RectangleF(260, 30, 60, 80));
222
g.Clip = new
Region
(new RectangleF(260, 30, 60, 80));
243
g.SetClip(new
Region
(new Rectangle(50, 40, 210, 220)), CombineMode.Replace);
292
g.Clip = new
Region
(new Rectangle(0, 0, 100, 100));
305
g.Clip = new
Region
(new Rectangle(1, 2, 20, 25));
336
Region r =
new
();
361
Graphics.Clip = new
Region
(new Rectangle(0, 0, width, height));
456
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
466
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
482
g.Clip = new
Region
(clip);
497
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
513
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
528
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
544
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
563
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
599
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
622
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
643
g.Clip = new
Region
(new Rectangle(0, 0, 8, 8));
955
g.Clip = new
Region
(new Rectangle(10, 10, 10, 10));
988
g.Clip = new
Region
(new Rectangle(10, 10, 10, 10));
1022
g.Clip = new
Region
(new Rectangle(10, 10, 10, 10));
1103
g.Clip = new
Region
(new Rectangle(10, 10, 10, 10));
1194
g.Clip = new
Region
(rect);
2209
g.Clip = new
Region
(new RectangleF(0, 0, 32, 32));
2242
g.Clip = new
Region
(new RectangleF(0, 0, 200, 200));
System\Drawing\Graphics_GetContextTests.Core.cs (4)
29
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
62
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
81
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
100
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
System\Drawing\Graphics_GetContextTests.cs (5)
33
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
65
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
83
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
101
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
122
using Region initialClip =
new
(new Rectangle(1, 2, 9, 10));
System\Drawing\RegionTests.cs (220)
36
Region region =
new
();
44
using Region region =
new
();
58
using Region region =
new
(rectangle);
74
using Region region =
new
(rectangle);
82
yield return new object[] { new
Region
() };
83
yield return new object[] { new
Region
(new Rectangle(0, 0, 0, 0)) };
84
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)) };
93
using Region otherRegion =
new
(region.GetRegionData());
106
using Region region =
new
(graphicsPath);
113
using Region region =
new
(new Rectangle(1, 2, 3, 4));
114
using Region other =
new
(region.GetRegionData());
121
AssertExtensions.Throws<ArgumentNullException>("rgnData", () => new
Region
((RegionData)null));
127
using Region region =
new
();
130
AssertExtensions.Throws<ArgumentException>(null, () => new
Region
(regionData));
139
using Region region =
new
();
142
Assert.Throws<ExternalException>(() => new
Region
(regionData));
149
using Region region =
new
(graphicsPath);
151
Assert.Throws<ExternalException>(() => new
Region
(regionData));
157
using Region region =
new
();
160
Assert.Throws<NullReferenceException>(() => new
Region
(regionData));
170
using Region region =
new
(graphicsPath);
185
using Region region =
new
(graphicsPath);
225
using (Region region =
new
(path))
237
using Region region =
new
(path);
245
AssertExtensions.Throws<ArgumentNullException>("path", () => new
Region
((GraphicsPath)null));
254
AssertExtensions.Throws<ArgumentException>(null, () => new
Region
(path));
282
new
Region
(new RectangleF(10, 10, 100, 100)),
289
new
Region
(new RectangleF(70, 10, 100, 100)),
296
new
Region
(new RectangleF(40, 100, 100, 100)),
303
new
Region
(new RectangleF(40, 10, 100, 100)),
310
new
Region
(new RectangleF(30, 30, 80, 80)),
322
new
Region
(),
329
new
Region
(),
343
using Region other =
new
(rect);
355
using Region region =
new
(new Rectangle(20, 20, 20, 20));
356
using Region other =
new
(new Rectangle(20, 80, 20, 10));
371
using Region region =
new
();
388
using Region region =
new
(new Rectangle(1, 2, 3, 4));
390
using Region other =
new
();
405
using Region region =
new
();
412
AssertExtensions.Throws<ArgumentException>(null, () => new
Region
().Complement(CreateDisposedRegion()));
418
using Region region =
new
();
479
using Region region1 =
new
(rect1);
480
using Region region2 =
new
(rect2);
499
using Region region =
new
();
508
using Region region =
new
();
518
using Region other =
new
();
529
Region emptyRegion =
new
();
534
Region createdRegion =
new
();
536
yield return new object[] { new
Region
(), new
Region
(), true };
537
yield return new object[] { new
Region
(), Empty(), false };
538
yield return new object[] { new
Region
(), new
Region
(new Rectangle(1, 2, 3, 4)), false };
541
yield return new object[] { Empty(), new
Region
(new Rectangle(0, 0, 0, 0)), true };
542
yield return new object[] { Empty(), new
Region
(new Rectangle(1, 2, 3, 3)), false };
544
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)), new
Region
(new Rectangle(1, 2, 3, 4)), true };
545
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)), new
Region
(new RectangleF(1, 2, 3, 4)), true };
546
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)), new
Region
(new Rectangle(2, 2, 3, 4)), false };
547
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)), new
Region
(new Rectangle(1, 3, 3, 4)), false };
548
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)), new
Region
(new Rectangle(1, 2, 4, 4)), false };
549
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)), new
Region
(new Rectangle(1, 2, 3, 5)), false };
569
yield return new object[] { new
Region
(graphics1), new
Region
(graphics1), true };
570
yield return new object[] { new
Region
(graphics1), new
Region
(graphics2), true };
571
yield return new object[] { new
Region
(graphics1), new
Region
(graphics3), false };
572
yield return new object[] { new
Region
(graphics1), new
Region
(graphics4), false };
573
yield return new object[] { new
Region
(graphics1), new
Region
(graphics5), false };
574
yield return new object[] { new
Region
(graphics1), new
Region
(graphics6), false };
591
using Region region =
new
();
598
using Region region =
new
();
605
using Region region =
new
();
606
using Region other =
new
();
618
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Equals(new
Region
(), s_graphic));
619
AssertExtensions.Throws<ArgumentException>(null, () => new
Region
().Equals(disposedRegion, s_graphic));
626
new
Region
(new Rectangle(500, 30, 60, 80)),
633
new
Region
(new Rectangle(500, 30, 60, 80)),
640
new
Region
(),
653
new
Region
(),
661
new
Region
(new Rectangle(10, 10, 100, 100)),
674
new
Region
(new Rectangle(70, 10, 100, 100)),
687
new
Region
(new Rectangle(40, 100, 100, 100)),
700
new
Region
(new Rectangle(40, 10, 100, 100)),
713
new
Region
(new Rectangle(30, 30, 80, 80)),
730
new
Region
(new Rectangle(50, 100, 100, 100)),
738
new
Region
(new Rectangle(70, 60, 100, 70)),
746
new
Region
(new Rectangle(70, 60, 100, 70)),
754
new
Region
(new Rectangle(20, 20, 100, 100)),
761
new
Region
(new Rectangle(130, 30, 60, 80)),
779
using Region other =
new
(rect);
791
using Region region =
new
(new RectangleF(20, 20, 20, 20));
792
using Region union =
new
(new RectangleF(20, 80, 20, 10));
802
using Region region =
new
(new Rectangle(1, 2, 3, 4));
803
using Region other =
new
();
812
using Region region =
new
();
819
AssertExtensions.Throws<ArgumentException>(null, () => new
Region
().Exclude(CreateDisposedRegion()));
825
using Region region =
new
();
882
using Region region =
new
();
891
using Region region =
new
();
901
using Region other =
new
();
911
using Region region =
new
(new Rectangle(1, 2, 3, 4));
936
using Region region =
new
(new Rectangle(1, 2, 3, 4));
948
using Region region =
new
();
960
using Region region =
new
();
973
using Region region =
new
();
980
using Region region =
new
();
987
using Region region =
new
();
1010
using Region region =
new
(new Rectangle(1, 2, 3, 4));
1022
using Region region =
new
();
1036
using Region region =
new
();
1045
using Region clipRegion =
new
();
1062
new
Region
(new Rectangle(500, 30, 60, 80)),
1068
new
Region
(new Rectangle(0, 0, 0, 0)),
1075
new
Region
(new Rectangle(500, 30, 60, 80)),
1082
new
Region
(),
1089
new
Region
(),
1096
new
Region
(new RectangleF(260, 30, 60, 80)),
1103
new
Region
(new RectangleF(20, 330, 40, 50)),
1122
using Region rectangleRegion =
new
(rect);
1134
using Region region =
new
(new Rectangle(1, 2, 3, 4));
1136
using Region infiniteRegion =
new
();
1145
using Region region =
new
();
1152
AssertExtensions.Throws<ArgumentException>(null, () => new
Region
().Intersect(CreateDisposedRegion()));
1158
using Region region =
new
();
1181
using Region region =
new
();
1209
using Region region =
new
();
1239
using Region region =
new
();
1248
using Region region =
new
();
1258
using Region other =
new
();
1268
using Region region =
new
();
1281
using Region region =
new
();
1288
using Region region =
new
();
1303
Region infiniteExclude =
new
();
1308
yield return new object[] { new
Region
(), Rectangle.Empty, false };
1310
yield return new object[] { new
Region
(new Rectangle(0, 0, 10, 10)), new Rectangle(0, 0, 0, 1), false };
1311
yield return new object[] { new
Region
(new Rectangle(500, 30, 60, 80)), new Rectangle(500, 30, 60, 80), true };
1312
yield return new object[] { new
Region
(new Rectangle(500, 30, 60, 80)), new Rectangle(520, 40, 60, 80), true };
1314
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 2, 1), true };
1315
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 2, 2), true };
1316
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 10, 10), true };
1317
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 1, 1), true };
1318
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Rectangle(2, 2, 1, 1), false };
1319
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Rectangle(0, 0, 1, 1), false };
1320
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Rectangle(3, 3, 1, 1), false };
1355
Region infiniteExclude =
new
();
1360
yield return new object[] { new
Region
(), Point.Empty, true };
1362
yield return new object[] { new
Region
(new Rectangle(500, 30, 60, 80)), new Point(500, 29), false };
1363
yield return new object[] { new
Region
(new Rectangle(500, 30, 60, 80)), new Point(500, 30), true };
1365
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(0, 1), false };
1366
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(1, 0), false };
1367
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(2, 0), false };
1368
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(3, 0), false };
1369
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(1, 1), true };
1370
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(2, 1), true };
1371
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(3, 1), false };
1372
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(0, 2), false };
1373
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(2, 2), false };
1374
yield return new object[] { new
Region
(new Rectangle(1, 1, 2, 1)), new Point(3, 2), false };
1490
new
Region
(new Rectangle(500, 30, 60, 80)),
1497
new
Region
(new Rectangle(500, 30, 60, 80)),
1504
new
Region
(new Rectangle(500, 30, 60, 80)),
1511
new
Region
(new Rectangle(500, 30, 60, 80)),
1523
new
Region
(),
1530
new
Region
(),
1538
new
Region
(new Rectangle(20, 20, 20, 20)),
1554
new
Region
(new Rectangle(20, 180, 40, 50)),
1572
new
Region
(new Rectangle(20, 330, 40, 50)),
1592
new
Region
(new Rectangle(10, 20, 50, 50)),
1609
new
Region
(new Rectangle(10, 10, 100, 100)),
1622
new
Region
(new Rectangle(70, 10, 100, 100)),
1635
new
Region
(new Rectangle(40, 100, 100, 100)),
1647
new
Region
(new Rectangle(40, 10, 100, 100)),
1659
new
Region
(new Rectangle(30, 30, 80, 80)),
1684
using Region other =
new
(rect);
1696
using Region region =
new
(new Rectangle(1, 2, 3, 4));
1697
using Region other =
new
();
1707
using Region region =
new
();
1714
using Region region =
new
();
1721
using Region region =
new
();
1778
using Region region =
new
();
1787
using Region region =
new
();
1797
using Region other =
new
();
1807
using Region region =
new
(new RectangleF(1, 2, 3, 4));
1816
using Region region =
new
(new RectangleF(1, 2, 3, 4));
1833
using Region region =
new
();
1848
using Region region =
new
();
1862
using Region region =
new
();
1875
using Region region =
new
();
1892
using Region region =
new
(new RectangleF(1, 2, 3, 4));
1901
using Region region =
new
();
1915
using Region region =
new
(new RectangleF(1, 2, 3, 4));
1924
using Region region =
new
();
1936
using Region region =
new
();
1953
using Region region =
new
(new RectangleF(1, 2, 3, 4));
1975
new
Region
(new RectangleF(500, 30, 60, 80)),
1982
new
Region
(new RectangleF(500, 30, 60, 80)),
1989
new
Region
(new RectangleF(0, 0, 0, 0)),
1996
new
Region
(),
2009
new
Region
(),
2016
new
Region
(new RectangleF(380, 30, 60, 80)),
2036
using Region other =
new
(rect);
2048
using Region region =
new
(new Rectangle(1, 2, 3, 4));
2049
using Region other =
new
();
2065
using Region region =
new
();
2072
using Region region =
new
();
2079
using Region region =
new
();
2136
using Region region =
new
();
2145
using Region region =
new
();
2155
using Region other =
new
();
System.Windows.Forms (9)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5435
using (Region region =
new
(scroll))
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
588
Region visualRegion =
new
(visualRectangle);
1083
using Region region =
new
(focusRectangle);
1278
g.Clip = IsLabelFilledByOneLink() ? new
Region
(focusRectangle) : link.VisualRegion;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
1817
region ??= new
Region
(regionRect);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
29
Region region =
new
(bounds);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
882
Region parentRegionToPaint =
new
(topLeftParentHorizontalPixels);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
315
using Region windowRegion =
new
(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
40
_region = new
Region
(new Rectangle(0, 0, 0, 0));
System.Windows.Forms.Design (27)
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
139
result.Clip = new
Region
(_adornerWindow.DesignerFrameDisplayRectangle);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
703
_dragImageRegion = new
Region
(controlRect);
800
Region invalidRegion =
new
(unionRectangle);
954
_dragImageRegion = new
Region
(controlRect);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (3)
386
using (Region newRegion =
new
(borderRect))
853
using Region newRegion =
new
(newBorderRect);
862
using Region oldRegion =
new
(oldBorderRect);
System\Windows\Forms\Design\Behavior\SelectionManager.cs (1)
316
Region toRefresh =
new
(Rectangle.Empty);
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
332
using Region invalidRegion =
new
(_lastRectangle);
System\Windows\Forms\Design\ControlDesigner.cs (1)
2121
using Region nonClient =
new
(controlScreenBounds);
System\Windows\Forms\Design\ParentControlDesigner.cs (3)
1790
using (Region newRegion =
new
(frameRect))
1982
using Region newRegion =
new
(frameRect);
1999
using Region oldRegion =
new
(oldFrameRect);
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (2)
73
_region =
new
(rect);
77
_region =
new
(Rectangle.Empty);
System\Windows\Forms\Design\SelectionUIService.cs (1)
830
Region region =
new
(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (2)
333
_region =
new
(_outerRect);
338
_region =
new
(Rectangle.Empty);
System\Windows\Forms\Design\TabOrder.cs (2)
197
_region = new
Region
(new Rectangle(0, 0, 0, 0));
208
_region = new
Region
(ctlOuter);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (3)
462
invalidateRegion = new
Region
(invalidateBounds);
468
itemRegion = new
Region
(invalidateBounds);
497
invalidateRegion = new
Region
(invalidateBounds);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
82
Region rgn =
new
(bounds);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (2)
1183
using Region invalidatingRegion =
new
(_dropDownSizeToInvalidate);
1920
using Region regionToInvalidate =
new
(_boundsToInvalidateOnRemove);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
839
Region rgn =
new
(invalidateBounds);
System.Windows.Forms.Primitives.Tests (3)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (2)
19
using Region r =
new
(clipRectangle);
102
using Region r =
new
(clipRectangle);
System\Windows\Forms\DeviceContextScopeTests.cs (1)
41
using Region region =
new
(new Rectangle(1, 1, 2, 3));
System.Windows.Forms.Tests (46)
System\Windows\Forms\ControlTests.Handlers.cs (4)
2182
yield return new object[] { testData, new
Region
() };
2183
yield return new object[] { testData, new
Region
(new Rectangle(1, 2, 3, 4)) };
2334
yield return new object[] { testData, new
Region
() };
2335
yield return new object[] { testData, new
Region
(new Rectangle(1, 2, 3, 4)) };
System\Windows\Forms\ControlTests.Methods.cs (30)
450
yield return new object[] { new
Region
() };
451
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)) };
637
yield return new object[] { new
Region
() };
638
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)) };
859
yield return new object[] { new
Region
() };
860
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)) };
3509
yield return new object[] { opaque, new
Region
(new Rectangle(0, 0, 10, 20)) };
3510
yield return new object[] { opaque, new
Region
(new Rectangle(1, 2, 3, 4)) };
3511
yield return new object[] { opaque, new
Region
(new Rectangle(5, 10, 5, 10)) };
3512
yield return new object[] { opaque, new
Region
(new Rectangle(100, 200, 300, 400)) };
3513
yield return new object[] { opaque, new
Region
(new Rectangle(-100, -200, -300, -400)) };
3514
yield return new object[] { opaque, new
Region
() };
3541
yield return new object[] { opaque, new
Region
(new Rectangle(0, 0, 10, 20)), new Rectangle(0, 0, 10, 20) };
3542
yield return new object[] { opaque, new
Region
(new Rectangle(1, 2, 3, 4)), new Rectangle(1, 2, 3, 4) };
3543
yield return new object[] { opaque, new
Region
(new Rectangle(5, 10, 5, 10)), new Rectangle(5, 10, 5, 10) };
3544
yield return new object[] { opaque, new
Region
(new Rectangle(100, 200, 300, 400)), new Rectangle(100, 200, 300, 400) };
3545
yield return new object[] { opaque, new
Region
(new Rectangle(-100, -200, -300, -400)), new Rectangle(-100, -200, -300, -400) };
3546
yield return new object[] { opaque, new
Region
(), new Rectangle(-4194304, -4194304, 8388608, 8388608) };
3648
yield return new object[] { opaque, new
Region
(new Rectangle(0, 0, 10, 20)), invalidateChildren };
3649
yield return new object[] { opaque, new
Region
(new Rectangle(1, 2, 3, 4)), invalidateChildren };
3650
yield return new object[] { opaque, new
Region
(new Rectangle(5, 10, 5, 10)), invalidateChildren };
3651
yield return new object[] { opaque, new
Region
(new Rectangle(100, 200, 300, 400)), invalidateChildren };
3652
yield return new object[] { opaque, new
Region
(new Rectangle(-100, -200, -300, -400)), invalidateChildren };
3653
yield return new object[] { opaque, new
Region
(), invalidateChildren };
3683
yield return new object[] { opaque, new
Region
(new Rectangle(0, 0, 10, 20)), invalidateChildren, new Rectangle(0, 0, 10, 20) };
3684
yield return new object[] { opaque, new
Region
(new Rectangle(1, 2, 3, 4)), invalidateChildren, new Rectangle(1, 2, 3, 4) };
3685
yield return new object[] { opaque, new
Region
(new Rectangle(5, 10, 5, 10)), invalidateChildren, new Rectangle(5, 10, 5, 10) };
3686
yield return new object[] { opaque, new
Region
(new Rectangle(100, 200, 300, 400)), invalidateChildren, new Rectangle(100, 200, 300, 400) };
3687
yield return new object[] { opaque, new
Region
(new Rectangle(-100, -200, -300, -400)), invalidateChildren, new Rectangle(-100, -200, -300, -400) };
3688
yield return new object[] { opaque, new
Region
(), invalidateChildren, new Rectangle(-4194304, -4194304, 8388608, 8388608) };
System\Windows\Forms\ControlTests.Properties.cs (6)
9870
yield return new object[] { new
Region
() };
9871
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)) };
9895
using Region oldValue =
new
();
9947
using Region oldValue =
new
();
9993
using Region region1 =
new
();
10004
using Region region2 =
new
();
System\Windows\Forms\TextRendererTests.cs (2)
759
using Region region =
new
(new Rectangle(1, 2, 6, 8));
807
using Region region =
new
(new Rectangle(1, 2, 6, 8));
System\Windows\Forms\ToolStripDropDownTests.cs (4)
2231
yield return new object[] { new
Region
() };
2232
yield return new object[] { new
Region
(new Rectangle(1, 2, 3, 4)) };
2295
using Region region1 =
new
();
2306
using Region region2 =
new
();
340 references to Region
System.Drawing (1)
System.Drawing.cs (1)
141
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
Region
))]
System.Drawing.Common (14)
Special\NotSupported.cs (14)
434
public System.Drawing.
Region
Clip { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
586
public void ExcludeClip(System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
611
public void FillRegion(System.Drawing.Brush brush, System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
633
public void IntersectClip(System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
642
public System.Drawing.
Region
[] MeasureCharacterRanges(string? text, System.Drawing.Font font, System.Drawing.RectangleF layoutRect, System.Drawing.StringFormat? stringFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
673
public void SetClip(System.Drawing.
Region
region, System.Drawing.Drawing2D.CombineMode combineMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1032
public System.Drawing.
Region
Clone() { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1036
public void Complement(System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1038
public bool Equals(System.Drawing.
Region
region, System.Drawing.Graphics g) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1042
public void Exclude(System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1044
public static System.Drawing.
Region
FromHrgn(System.IntPtr hrgn) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1052
public void Intersect(System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1079
public void Union(System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
1083
public void Xor(System.Drawing.
Region
region) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (194)
mono\System.Drawing\GraphicsTests.cs (13)
105
using
Region
r = new();
336
Region
r = new();
498
using
Region
clone = g.Clip.Clone();
1848
Region
[] regions = g.MeasureCharacterRanges(null, _font, default, null);
1872
Region
[] regions = g.MeasureCharacterRanges("Mono", _font, default, new StringFormat());
1902
Region
[] regions = g.MeasureCharacterRanges(text, _font, layout_rect, string_format);
1971
Region
[] regions = g.MeasureCharacterRanges(text, _font, layout_rect, string_format);
2006
private static
Region
[] Measure_Helper(Graphics gfx, RectangleF rect, bool useSpan)
2023
Region
[] zero = Measure_Helper(gfx, new RectangleF(0, 0, 0, 0), useSpan);
2026
Region
[] small = Measure_Helper(gfx, new RectangleF(0, 0, 100, 100), useSpan);
2038
Region
[] max = Measure_Helper(gfx, new RectangleF(0, 0, float.MaxValue, float.MaxValue), useSpan);
2057
Region
[] min = Measure_Helper(gfx, new RectangleF(0, 0, float.MinValue, float.MinValue), useSpan);
2068
Region
[] neg = Measure_Helper(gfx, new RectangleF(0, 0, -20, -20), useSpan);
mono\System.Imaging\MetafileTest.cs (1)
318
Region
[] region = g.MeasureCharacterRanges(text, test_font, rect, sf);
System\Drawing\Graphics_GetContextTests.Core.cs (11)
19
graphics.GetContextInfo(out offset, out
Region
? clip);
29
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
35
graphics.GetContextInfo(out offset, out
Region
? clip);
52
graphics.GetContextInfo(out offset, out
Region
? clip);
62
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
69
graphics.GetContextInfo(out offset, out
Region
? clip);
81
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
88
graphics.GetContextInfo(out offset, out
Region
? clip);
100
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
109
graphics.GetContextInfo(out offset, out
Region
? clip);
125
graphics.GetContextInfo(out PointF offset, out
Region
? clip);
System\Drawing\Graphics_GetContextTests.cs (20)
20
Assert.IsType<
Region
>(infoArray[0]);
22
using
Region
region = (
Region
)infoArray[0];
33
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
37
using
Region
region = (
Region
)info[0];
53
using
Region
region = (
Region
)info[0];
65
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
71
using
Region
region = (
Region
)info[0];
83
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
89
using
Region
region = (
Region
)info[0];
101
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
109
using
Region
region = (
Region
)info[0];
122
using
Region
initialClip = new(new Rectangle(1, 2, 9, 10));
131
using
Region
region = (
Region
)info[0];
System\Drawing\RegionTests.cs (149)
34
private static
Region
CreateDisposedRegion()
36
Region
region = new();
44
using
Region
region = new();
58
using
Region
region = new(rectangle);
74
using
Region
region = new(rectangle);
89
public void Ctor_RegionData(
Region
region)
93
using
Region
otherRegion = new(region.GetRegionData());
106
using
Region
region = new(graphicsPath);
113
using
Region
region = new(new Rectangle(1, 2, 3, 4));
114
using
Region
other = new(region.GetRegionData());
127
using
Region
region = new();
139
using
Region
region = new();
149
using
Region
region = new(graphicsPath);
157
using
Region
region = new();
170
using
Region
region = new(graphicsPath);
185
using
Region
region = new(graphicsPath);
225
using (
Region
region = new(path))
237
using
Region
region = new(path);
259
public void Clone(
Region
region)
262
using (
Region
clone = Assert.IsType<
Region
>(region.Clone()))
337
public void Complement_Region_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
343
using
Region
other = new(rect);
355
using
Region
region = new(new Rectangle(20, 20, 20, 20));
356
using
Region
other = new(new Rectangle(20, 80, 20, 10));
371
using
Region
region = new();
388
using
Region
region = new(new Rectangle(1, 2, 3, 4));
390
using
Region
other = new();
405
using
Region
region = new();
406
AssertExtensions.Throws<ArgumentNullException>("region", () => region.Complement((
Region
)null));
418
using
Region
region = new();
424
public void Complement_Rectangle_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
440
public void Complement_RectangleF_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
456
public void Complement_GraphicsPath_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
479
using
Region
region1 = new(rect1);
480
using
Region
region2 = new(rect2);
499
using
Region
region = new();
508
using
Region
region = new();
515
Region
disposedRegion = CreateDisposedRegion();
518
using
Region
other = new();
527
static
Region
Empty()
529
Region
emptyRegion = new();
534
Region
createdRegion = new();
579
public void Equals_Valid_ReturnsExpected(
Region
region,
Region
other, bool expected)
591
using
Region
region = new();
598
using
Region
region = new();
605
using
Region
region = new();
606
using
Region
other = new();
616
Region
disposedRegion = CreateDisposedRegion();
773
public void Exclude_Region_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
779
using
Region
other = new(rect);
791
using
Region
region = new(new RectangleF(20, 20, 20, 20));
792
using
Region
union = new(new RectangleF(20, 80, 20, 10));
802
using
Region
region = new(new Rectangle(1, 2, 3, 4));
803
using
Region
other = new();
812
using
Region
region = new();
813
AssertExtensions.Throws<ArgumentNullException>("region", () => region.Exclude((
Region
)null));
825
using
Region
region = new();
831
public void Exclude_Rectangle_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
847
public void Exclude_RectangleF_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
863
public void Exclude_GraphicsPath_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
882
using
Region
region = new();
891
using
Region
region = new();
898
Region
disposedRegion = CreateDisposedRegion();
901
using
Region
other = new();
911
using
Region
region = new(new Rectangle(1, 2, 3, 4));
917
Region
newRegion =
Region
.FromHrgn(handle1);
930
AssertExtensions.Throws<ArgumentException>(null, () =>
Region
.FromHrgn(IntPtr.Zero));
936
using
Region
region = new(new Rectangle(1, 2, 3, 4));
948
using
Region
region = new();
960
using
Region
region = new();
973
using
Region
region = new();
980
using
Region
region = new();
987
using
Region
region = new();
1010
using
Region
region = new(new Rectangle(1, 2, 3, 4));
1022
using
Region
region = new();
1036
using
Region
region = new();
1045
using
Region
clipRegion = new();
1116
public void Intersect_Region_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1122
using
Region
rectangleRegion = new(rect);
1134
using
Region
region = new(new Rectangle(1, 2, 3, 4));
1136
using
Region
infiniteRegion = new();
1145
using
Region
region = new();
1146
AssertExtensions.Throws<ArgumentNullException>("region", () => region.Intersect((
Region
)null));
1158
using
Region
region = new();
1164
public void Intersect_Rectangle_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1181
using
Region
region = new();
1192
public void Intersect_RectangleF_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1209
using
Region
region = new();
1220
public void Intersect_GraphicsPath_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1239
using
Region
region = new();
1248
using
Region
region = new();
1255
Region
disposedRegion = CreateDisposedRegion();
1258
using
Region
other = new();
1268
using
Region
region = new();
1281
using
Region
region = new();
1288
using
Region
region = new();
1303
Region
infiniteExclude = new();
1325
public void IsVisible_Rectangle_ReturnsExpected(
Region
region, Rectangle rectangle, bool expected)
1355
Region
infiniteExclude = new();
1379
public void IsVisible_Point_ReturnsExpected(
Region
region, Point point, bool expected)
1413
Region
disposedRegion = CreateDisposedRegion();
1438
public void MakeEmpty_NonEmpty_Success(
Region
region)
1465
public void MakeInfinite_NonInfinity_Success(
Region
region)
1678
public void Union_Region_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1684
using
Region
other = new(rect);
1696
using
Region
region = new(new Rectangle(1, 2, 3, 4));
1697
using
Region
other = new();
1707
using
Region
region = new();
1708
AssertExtensions.Throws<ArgumentNullException>("region", () => region.Union((
Region
)null));
1714
using
Region
region = new();
1721
using
Region
region = new();
1727
public void Union_Rectangle_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1743
public void Union_RectangleF_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1759
public void Union_GraphicsPath_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
1778
using
Region
region = new();
1787
using
Region
region = new();
1794
Region
disposedRegion = CreateDisposedRegion();
1797
using
Region
other = new();
1807
using
Region
region = new(new RectangleF(1, 2, 3, 4));
1816
using
Region
region = new(new RectangleF(1, 2, 3, 4));
1833
using
Region
region = new();
1848
using
Region
region = new();
1862
using
Region
region = new();
1875
using
Region
region = new();
1892
using
Region
region = new(new RectangleF(1, 2, 3, 4));
1901
using
Region
region = new();
1915
using
Region
region = new(new RectangleF(1, 2, 3, 4));
1924
using
Region
region = new();
1936
using
Region
region = new();
1953
using
Region
region = new(new RectangleF(1, 2, 3, 4));
1965
Region
disposedRegion = CreateDisposedRegion();
2030
public void Xor_Region_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
2036
using
Region
other = new(rect);
2048
using
Region
region = new(new Rectangle(1, 2, 3, 4));
2049
using
Region
other = new();
2065
using
Region
region = new();
2066
AssertExtensions.Throws<ArgumentNullException>("region", () => region.Xor((
Region
)null));
2072
using
Region
region = new();
2079
using
Region
region = new();
2085
public void Xor_Rectangle_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
2101
public void Xor_RectangleF_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
2117
public void Xor_GraphicsPath_Success(
Region
region, RectangleF[] rectangles, RectangleF[] expectedScans)
2136
using
Region
region = new();
2145
using
Region
region = new();
2152
Region
disposedRegion = CreateDisposedRegion();
2155
using
Region
other = new();
System.Windows.Forms (55)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (4)
63
private
Region
ActiveXMergeRegion(
Region
region) => ActiveXInstance.MergeRegion(region);
1211
internal
Region
MergeRegion(
Region
region)
System\Windows\Forms\Control.cs (12)
2242
using
Region
working = new(temp);
2713
public
Region
? Region
2715
get => Properties.GetValueOrDefault<
Region
>(s_regionProperty);
2718
Region
? oldRegion = SetRegionInternal(value);
2727
private
Region
? SetRegionInternal(
Region
? region)
2729
Region
? oldRegion = Properties.AddOrRemoveValue(s_regionProperty, region);
2744
using
Region
? regionCopy = IsActiveX ? ActiveXMergeRegion(region.Clone()) : null;
5757
public void Invalidate(
Region
? region)
5768
public unsafe void Invalidate(
Region
? region, bool invalidateChildren)
7236
Region
? region = Region;
8146
internal unsafe void PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle,
Region
? transparentRegion = null)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (2)
376
Region
oldClip = graphics.Clip;
386
Region
newClip = oldClip.Clone();
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
76
Region
? originalClip = null;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (4)
5435
using (
Region
region = new(scroll))
19421
Region
? clipRegion = null;
19507
using
Region
clipRegion = g.Clip;
19524
using
Region
clipRegion = g.Clip;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
864
using
Region
originalClip = g.Clip;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1587
Region
? clipRegion = null;
System\Windows\Forms\Controls\Labels\LinkLabel.cs (8)
43
private
Region
? _textRegion;
509
private
Region
? EnsureRun(Graphics g)
534
Region
[] textRegions = g.MeasureCharacterRanges(text, alwaysUnderlined, ClientRectWithPadding, textFormat);
588
Region
visualRegion = new(visualRectangle);
971
Region
? textRegion = EnsureRun(g);
1024
Region
originalClip = g.Clip;
1083
using
Region
region = new(focusRectangle);
1231
Region
textRegion)
System\Windows\Forms\Controls\Labels\LinkLabel.Link.cs (1)
182
internal
Region
? VisualRegion { get; set; }
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (1)
36
Region
? region = _owningLink.VisualRegion;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1581
Region
oldClip = g.Clip;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (5)
1784
Region
? region = null;
2629
using
Region
? transparentRegion = Renderer.GetTransparentRegion(this);
3453
using
Region
? transparentRegion = Renderer.GetTransparentRegion(this);
3641
using (
Region
? transparentRegion = Renderer.GetTransparentRegion(this))
3670
private void EraseCorners(PaintEventArgs e,
Region
transparentRegion)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
665
public new
Region
? Region
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
29
Region
region = new(bounds);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
834
internal override
Region
? GetTransparentRegion(ToolStrip toolStrip)
882
Region
parentRegionToPaint = new(topLeftParentHorizontalPixels);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
561
internal virtual
Region
? GetTransparentRegion(ToolStrip toolStrip)
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
315
using
Region
windowRegion = new(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (2)
15
private
Region
? _region;
31
public unsafe
Region
Region
System\Windows\Forms\Rendering\ControlPaint.cs (1)
1878
Region
clip = graphics.Clip;
System\Windows\Forms\Rendering\DrawingEventArgs.cs (1)
157
graphics.GetContextInfo(out PointF offset, out
Region
? clip);
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (4)
446
public unsafe
Region
? GetBackgroundRegion(IDeviceContext dc, Rectangle bounds)
469
Region
region =
Region
.FromHrgn(hrgn);
738
public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle,
Region
region, Point pt, HitTestOptions options)
System.Windows.Forms.Design (43)
System\Windows\Forms\Design\Behavior\Adorner.cs (1)
84
public void Invalidate(
Region
region)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (2)
127
internal void InvalidateAdornerWindow(
Region
region)
303
using
Region
region = hrgn.ToRegion();
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
377
public void Invalidate(
Region
r) => _adornerWindow.InvalidateAdornerWindow(r);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
58
private
Region
_dragImageRegion;
800
Region
invalidRegion = new(unionRectangle);
804
using (
Region
invalidDragRegion = _dragImageRegion.Clone())
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (4)
49
private
Region
_lastResizeRegion;
386
using (
Region
newRegion = new(borderRect))
853
using
Region
newRegion = new(newBorderRect);
862
using
Region
oldRegion = new(oldBorderRect);
System\Windows\Forms\Design\Behavior\SelectionManager.cs (3)
314
private
Region
DetermineRegionToRefresh(object? primarySelection, Rectangle[] previousSelectionBounds, Rectangle[] currentSelectionBounds)
316
Region
toRefresh = new(Rectangle.Empty);
425
Region
toUpdate = DetermineRegionToRefresh(primarySelection, _previousSelectionBounds, _currentSelectionBounds);
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
332
using
Region
invalidRegion = new(_lastRectangle);
System\Windows\Forms\Design\ControlDesigner.cs (4)
2054
using
Region
region = hrgn.ToRegion();
2121
using
Region
nonClient = new(controlScreenBounds);
2263
using
Region
textRegion = e.Graphics.MeasureCharacterRanges(exceptionText, errorFont, textRect, stringFormat)[0];
2266
Region
originalClip = e.Graphics.Clip;
System\Windows\Forms\Design\DesignerFrame.cs (3)
255
void IOverlayService.InvalidateOverlays(
Region
screenRegion)
477
public void InvalidateOverlays(
Region
screenRegion)
485
using
Region
intersectionRegion = screenRegion.Clone();
System\Windows\Forms\Design\DesignerUtils.cs (2)
212
public static void DrawResizeBorder(Graphics g,
Region
resizeBorder, Color backColor)
226
public static void DrawFrame(Graphics g,
Region
resizeBorder, FrameStyle style, Color backColor)
System\Windows\Forms\Design\IOverlayService.cs (1)
43
void InvalidateOverlays(
Region
screenRegion);
System\Windows\Forms\Design\ParentControlDesigner.cs (3)
1790
using (
Region
newRegion = new(frameRect))
1982
using
Region
newRegion = new(frameRect);
1999
using
Region
oldRegion = new(oldFrameRect);
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (1)
63
public override
Region
GetRegion()
System\Windows\Forms\Design\SelectionUIService.cs (1)
830
Region
region = new(new Rectangle(0, 0, 0, 0));
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (3)
64
internal
Region
? _region; // region object that defines the shape
137
Region
oldClip = graphics.Clip;
327
public virtual
Region
GetRegion()
System\Windows\Forms\Design\TabOrder.cs (2)
33
private
Region
? _region;
216
Region
clip = graphics.Clip;
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (2)
134
public void Invalidate(
Region
r)
256
internal void InvalidateAdornerWindow(
Region
region)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
430
Region
invalidateRegion = null;
431
Region
itemRegion = null;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
82
Region
rgn = new(bounds);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (2)
1183
using
Region
invalidatingRegion = new(_dropDownSizeToInvalidate);
1920
using
Region
regionToInvalidate = new(_boundsToInvalidateOnRemove);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
839
Region
rgn = new(invalidateBounds);
System.Windows.Forms.Primitives (3)
System\Drawing\RegionExtensions.cs (2)
8
public static
Region
ToRegion(this RegionScope scope) =>
Region
.FromHrgn(scope.Region);
System\Windows\Forms\GraphicsClipScope.cs (1)
13
private readonly
Region
_originalClip;
System.Windows.Forms.Primitives.Tests (4)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (2)
19
using
Region
r = new(clipRectangle);
102
using
Region
r = new(clipRectangle);
System\Windows\Forms\DeviceContextScopeTests.cs (2)
35
using
Region
oldRegion = graphics.Clip;
41
using
Region
region = new(new Rectangle(1, 1, 2, 3));
System.Windows.Forms.Tests (26)
System\Windows\Forms\ControlTests.Handlers.cs (3)
2189
public void Control_OnHandleCreated_InvokeWithRegion_CallsHandleCreated(EventArgs eventArgs,
Region
region)
2341
public void Control_OnHandleDestroyed_InvokeWithRegion_CallsHandleDestroyed(EventArgs eventArgs,
Region
region)
2480
public void Control_OnHandleDestroyed_InvokeWithHandleWithRegion_CallsHandleDestroyed(EventArgs eventArgs,
Region
region)
System\Windows\Forms\ControlTests.Methods.cs (9)
456
public void Control_CreateControl_InvokeWithRegion_Success(
Region
region)
643
public void Control_CreateHandle_InvokeWithRegion_Success(
Region
region)
865
public void Control_DestroyHandle_InvokeWithRegion_Success(
Region
region)
3520
public void Control_Invalidate_InvokeRegion_Success(bool opaque,
Region
region)
3552
public void Control_Invalidate_InvokeRegionWithHandle_Success(bool opaque,
Region
region, Rectangle expectedInvalidRect)
3588
public void Control_Invalidate_InvokeRegionWithChildrenWithHandle_Success(bool opaque,
Region
region, Rectangle expectedInvalidRect)
3660
public void Control_Invalidate_InvokeRegionBool_Success(bool opaque,
Region
region, bool invalidateChildren)
3695
public void Control_Invalidate_InvokeRegionBoolWithHandle_Success(bool opaque,
Region
region, bool invalidateChildren, Rectangle expectedInvalidRect)
3731
public void Control_Invalidate_InvokeRegionBoolWithChildrenWithHandle_Success(bool opaque,
Region
region, bool invalidateChildren, Rectangle expectedInvalidRect)
System\Windows\Forms\ControlTests.Properties.cs (8)
9876
public void Control_Region_Set_GetReturnsExpected(
Region
value)
9893
public void Control_Region_SetWithNonNullOldValue_GetReturnsExpected(
Region
value)
9895
using
Region
oldValue = new();
9916
public void Control_Region_SetWithHandle_GetReturnsExpected(
Region
value)
9945
public void Control_Region_SetWithNonNullOldValueWithHandle_GetReturnsExpected(
Region
value)
9947
using
Region
oldValue = new();
9993
using
Region
region1 = new();
10004
using
Region
region2 = new();
System\Windows\Forms\TextRendererTests.cs (2)
759
using
Region
region = new(new Rectangle(1, 2, 6, 8));
807
using
Region
region = new(new Rectangle(1, 2, 6, 8));
System\Windows\Forms\ToolStripDropDownTests.cs (4)
2237
public void ToolStripDropDown_Region_Set_GetReturnsExpected(
Region
value)
2254
public void ToolStripDropDown_Region_SetWithHandle_GetReturnsExpected(
Region
value)
2295
using
Region
region1 = new();
2306
using
Region
region2 = new();