175 references to new
System.Drawing.Common.Tests (109)
mono\System.Drawing\GraphicsTests.cs (20)
152g.Clip = new Region(new Rectangle(50, 40, 210, 220)); 243g.SetClip(new Region(new Rectangle(50, 40, 210, 220)), CombineMode.Replace); 292g.Clip = new Region(new Rectangle(0, 0, 100, 100)); 305g.Clip = new Region(new Rectangle(1, 2, 20, 25)); 361Graphics.Clip = new Region(new Rectangle(0, 0, width, height)); 456g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 466g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 497g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 513g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 528g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 544g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 563g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 599g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 622g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 643g.Clip = new Region(new Rectangle(0, 0, 8, 8)); 955g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 988g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 1022g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 1103g.Clip = new Region(new Rectangle(10, 10, 10, 10)); 1194g.Clip = new Region(rect);
System\Drawing\Graphics_GetContextTests.Core.cs (4)
29using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 62using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 81using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 100using Region initialClip = new(new Rectangle(1, 2, 9, 10));
System\Drawing\Graphics_GetContextTests.cs (5)
33using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 65using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 83using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 101using Region initialClip = new(new Rectangle(1, 2, 9, 10)); 122using Region initialClip = new(new Rectangle(1, 2, 9, 10));
System\Drawing\RegionTests.cs (80)
58using Region region = new(rectangle); 83yield return new object[] { new Region(new Rectangle(0, 0, 0, 0)) }; 84yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 113using Region region = new(new Rectangle(1, 2, 3, 4)); 355using Region region = new(new Rectangle(20, 20, 20, 20)); 356using Region other = new(new Rectangle(20, 80, 20, 10)); 388using Region region = new(new Rectangle(1, 2, 3, 4)); 479using Region region1 = new(rect1); 480using Region region2 = new(rect2); 538yield return new object[] { new Region(), new Region(new Rectangle(1, 2, 3, 4)), false }; 541yield return new object[] { Empty(), new Region(new Rectangle(0, 0, 0, 0)), true }; 542yield return new object[] { Empty(), new Region(new Rectangle(1, 2, 3, 3)), false }; 544yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 2, 3, 4)), true }; 545yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new RectangleF(1, 2, 3, 4)), true }; 546yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(2, 2, 3, 4)), false }; 547yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 3, 3, 4)), false }; 548yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 2, 4, 4)), false }; 549yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new Rectangle(1, 2, 3, 5)), false }; 626new Region(new Rectangle(500, 30, 60, 80)), 633new Region(new Rectangle(500, 30, 60, 80)), 661new Region(new Rectangle(10, 10, 100, 100)), 674new Region(new Rectangle(70, 10, 100, 100)), 687new Region(new Rectangle(40, 100, 100, 100)), 700new Region(new Rectangle(40, 10, 100, 100)), 713new Region(new Rectangle(30, 30, 80, 80)), 730new Region(new Rectangle(50, 100, 100, 100)), 738new Region(new Rectangle(70, 60, 100, 70)), 746new Region(new Rectangle(70, 60, 100, 70)), 754new Region(new Rectangle(20, 20, 100, 100)), 761new Region(new Rectangle(130, 30, 60, 80)), 802using Region region = new(new Rectangle(1, 2, 3, 4)); 911using Region region = new(new Rectangle(1, 2, 3, 4)); 936using Region region = new(new Rectangle(1, 2, 3, 4)); 1010using Region region = new(new Rectangle(1, 2, 3, 4)); 1062new Region(new Rectangle(500, 30, 60, 80)), 1068new Region(new Rectangle(0, 0, 0, 0)), 1075new Region(new Rectangle(500, 30, 60, 80)), 1134using Region region = new(new Rectangle(1, 2, 3, 4)); 1310yield return new object[] { new Region(new Rectangle(0, 0, 10, 10)), new Rectangle(0, 0, 0, 1), false }; 1311yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Rectangle(500, 30, 60, 80), true }; 1312yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Rectangle(520, 40, 60, 80), true }; 1314yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 2, 1), true }; 1315yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 2, 2), true }; 1316yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 10, 10), true }; 1317yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(1, 1, 1, 1), true }; 1318yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(2, 2, 1, 1), false }; 1319yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(0, 0, 1, 1), false }; 1320yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Rectangle(3, 3, 1, 1), false }; 1362yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Point(500, 29), false }; 1363yield return new object[] { new Region(new Rectangle(500, 30, 60, 80)), new Point(500, 30), true }; 1365yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(0, 1), false }; 1366yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(1, 0), false }; 1367yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 0), false }; 1368yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 0), false }; 1369yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(1, 1), true }; 1370yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 1), true }; 1371yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 1), false }; 1372yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(0, 2), false }; 1373yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(2, 2), false }; 1374yield return new object[] { new Region(new Rectangle(1, 1, 2, 1)), new Point(3, 2), false }; 1490new Region(new Rectangle(500, 30, 60, 80)), 1497new Region(new Rectangle(500, 30, 60, 80)), 1504new Region(new Rectangle(500, 30, 60, 80)), 1511new Region(new Rectangle(500, 30, 60, 80)), 1538new Region(new Rectangle(20, 20, 20, 20)), 1554new Region(new Rectangle(20, 180, 40, 50)), 1572new Region(new Rectangle(20, 330, 40, 50)), 1592new Region(new Rectangle(10, 20, 50, 50)), 1609new Region(new Rectangle(10, 10, 100, 100)), 1622new Region(new Rectangle(70, 10, 100, 100)), 1635new Region(new Rectangle(40, 100, 100, 100)), 1647new Region(new Rectangle(40, 10, 100, 100)), 1659new Region(new Rectangle(30, 30, 80, 80)), 1696using Region region = new(new Rectangle(1, 2, 3, 4)); 2048using Region region = new(new Rectangle(1, 2, 3, 4));
System.Windows.Forms (7)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5435using (Region region = new(scroll))
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
588Region visualRegion = new(visualRectangle);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
1819region ??= new Region(regionRect);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (1)
29Region region = new(bounds);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
882Region parentRegionToPaint = new(topLeftParentHorizontalPixels);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
315using 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)
139result.Clip = new Region(_adornerWindow.DesignerFrameDisplayRectangle);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
703_dragImageRegion = new Region(controlRect); 800Region invalidRegion = new(unionRectangle); 954_dragImageRegion = new Region(controlRect);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (3)
386using (Region newRegion = new(borderRect)) 853using Region newRegion = new(newBorderRect); 862using Region oldRegion = new(oldBorderRect);
System\Windows\Forms\Design\Behavior\SelectionManager.cs (1)
316Region toRefresh = new(Rectangle.Empty);
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
332using Region invalidRegion = new(_lastRectangle);
System\Windows\Forms\Design\ControlDesigner.cs (1)
2123using Region nonClient = new(controlScreenBounds);
System\Windows\Forms\Design\ParentControlDesigner.cs (3)
1789using (Region newRegion = new(frameRect)) 1981using Region newRegion = new(frameRect); 1998using 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)
830Region 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)
462invalidateRegion = new Region(invalidateBounds); 468itemRegion = new Region(invalidateBounds); 497invalidateRegion = new Region(invalidateBounds);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
82Region rgn = new(bounds);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (2)
1183using Region invalidatingRegion = new(_dropDownSizeToInvalidate); 1920using Region regionToInvalidate = new(_boundsToInvalidateOnRemove);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
839Region rgn = new(invalidateBounds);
System.Windows.Forms.Primitives.Tests (3)
System\Windows\Forms\DeviceContextHdcScopeTests.cs (2)
19using Region r = new(clipRectangle); 102using Region r = new(clipRectangle);
System\Windows\Forms\DeviceContextScopeTests.cs (1)
41using Region region = new(new Rectangle(1, 1, 2, 3));
System.Windows.Forms.Tests (29)
System\Windows\Forms\ControlTests.Handlers.cs (2)
2183yield return new object[] { testData, new Region(new Rectangle(1, 2, 3, 4)) }; 2335yield return new object[] { testData, new Region(new Rectangle(1, 2, 3, 4)) };
System\Windows\Forms\ControlTests.Methods.cs (23)
451yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 638yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 860yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) }; 3509yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)) }; 3510yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)) }; 3511yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)) }; 3512yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)) }; 3513yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)) }; 3541yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)), new Rectangle(0, 0, 10, 20) }; 3542yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)), new Rectangle(1, 2, 3, 4) }; 3543yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)), new Rectangle(5, 10, 5, 10) }; 3544yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)), new Rectangle(100, 200, 300, 400) }; 3545yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)), new Rectangle(-100, -200, -300, -400) }; 3648yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)), invalidateChildren }; 3649yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)), invalidateChildren }; 3650yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)), invalidateChildren }; 3651yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)), invalidateChildren }; 3652yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)), invalidateChildren }; 3683yield return new object[] { opaque, new Region(new Rectangle(0, 0, 10, 20)), invalidateChildren, new Rectangle(0, 0, 10, 20) }; 3684yield return new object[] { opaque, new Region(new Rectangle(1, 2, 3, 4)), invalidateChildren, new Rectangle(1, 2, 3, 4) }; 3685yield return new object[] { opaque, new Region(new Rectangle(5, 10, 5, 10)), invalidateChildren, new Rectangle(5, 10, 5, 10) }; 3686yield return new object[] { opaque, new Region(new Rectangle(100, 200, 300, 400)), invalidateChildren, new Rectangle(100, 200, 300, 400) }; 3687yield return new object[] { opaque, new Region(new Rectangle(-100, -200, -300, -400)), invalidateChildren, new Rectangle(-100, -200, -300, -400) };
System\Windows\Forms\ControlTests.Properties.cs (1)
9871yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) };
System\Windows\Forms\TextRendererTests.cs (2)
759using Region region = new(new Rectangle(1, 2, 6, 8)); 807using Region region = new(new Rectangle(1, 2, 6, 8));
System\Windows\Forms\ToolStripDropDownTests.cs (1)
2232yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)) };