350 instantiations of RectangleF
PresentationCore (1)
System\Windows\Nrbf\SerializationRecordExtensions.cs (1)
77value = new RectangleF(
System.Drawing.Common.Tests (326)
mono\System.Drawing\BitmapTests.cs (1)
375using Bitmap bmp_rotate = src.Clone(new RectangleF(0, 0, width, height), PixelFormat.Format32bppArgb);
mono\System.Drawing\GraphicsTests.cs (27)
177g.Clip = new Region(new RectangleF(10, 10, 100, 100)); 204g.Clip = new Region(new RectangleF(260, 30, 60, 80)); 221g.Clip = new Region(new RectangleF(260, 30, 60, 80)); 254g.SetClip(new RectangleF(50, 40, 210, 220)); 854new(0.0f, 5.0f, -10.0f, -10.0f), 855new(15.0f, 0.0f, -10.0f, 5.0f) 892new(0.0f, 5.0f, -10.0f, -10.0f), 893new(15.0f, 0.0f, -10.0f, 5.0f) 1036GraphicsContainer gc = g.BeginContainer(new RectangleF(40, 30, 20, 10), new RectangleF(10, 20, 30, 40), GraphicsUnit.Inch); 1050g.BeginContainer(new RectangleF(40, 30, 20, 10), new RectangleF(10, 20, 30, 40), unit); 1900RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 1925RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 1966RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 2022Region[] zero = Measure_Helper(gfx, new RectangleF(0, 0, 0, 0), useSpan); 2025Region[] small = Measure_Helper(gfx, new RectangleF(0, 0, 100, 100), useSpan); 2037Region[] max = Measure_Helper(gfx, new RectangleF(0, 0, float.MaxValue, float.MaxValue), useSpan); 2056Region[] min = Measure_Helper(gfx, new RectangleF(0, 0, float.MinValue, float.MinValue), useSpan); 2067Region[] neg = Measure_Helper(gfx, new RectangleF(0, 0, -20, -20), useSpan); 2208g.Clip = new Region(new RectangleF(0, 0, 32, 32)); 2241g.Clip = new Region(new RectangleF(0, 0, 200, 200)); 2401Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new RectangleF(0, 0, 0, 0))); 2409g.DrawImage(bmp, new RectangleF(0, 0, 0, 0)); 2410g.DrawImage(bmp, new RectangleF(20, 40, 0, 0)); 2411g.DrawImage(bmp, new RectangleF(10, 20, -1, 0)); 2412g.DrawImage(bmp, new RectangleF(20, 10, 0, -1));
mono\System.Imaging\MetafileTest.cs (1)
317RectangleF rect = new(0, 0, size.Width, size.Height);
System\Drawing\BitmapTests.cs (5)
426AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, width, height), bitmap.PixelFormat)); 440Assert.Throws<ExternalException>(() => bitmap.Clone(new RectangleF(x, y, width, height), bitmap.PixelFormat)); 456Assert.Throws<ExternalException>(() => bitmap.Clone(new RectangleF(0, 0, 1, 1), format)); 464Assert.Throws<ExternalException>(() => bitmap.Clone(new RectangleF(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 485AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, 1, 1), PixelFormat.Format32bppArgb));
System\Drawing\Drawing2D\GraphicsPathTests.cs (40)
349gpf.AddArc(new RectangleF(1, 1, 2, 2), Pi4, Pi4); 709gpf.AddRectangle(new RectangleF(1, 1, 2, 2)); 728gpf.AddRectangle(new RectangleF(1, 1, 1, 1)); 735gpf.AddRectangle(new RectangleF(endF.X, endF.Y, 1, 1)); 751gpf.AddRectangle(new RectangleF(1f, 2f, width, height)); 759RectangleF[] rectFloat = [new(1, 1, 2, 2), new(3, 3, 4, 4)]; 784new(1, 1, 0f, 0f), 785new(1, 1, 2, 2), 786new(1, 1, 2, 2) 819gpf.AddEllipse(new RectangleF(1, 1, 2, 2)); 1010gpf.AddString("mono", FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f), StringFormat.GenericDefault); 1030gpf.AddString("mono", FontFamily.GenericMonospace, 0, -10, new RectangleF(10f, 10f, 10f, 10f), StringFormat.GenericDefault); 1040gp1.AddString("mono", FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f), null); 1043gp2.AddString("mono", FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f), StringFormat.GenericDefault); 1046gp3.AddString("mono", FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f), StringFormat.GenericTypographic); 1073gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new RectangleF(10f, 10f, 10f, 10f), StringFormat.GenericDefault)); 1093Assert.Equal(new RectangleF(6f, 6f, 6f, 6f), gp.GetBounds()); 1119Assert.Equal(new RectangleF(0f, 0f, 0f, 0f), gp.GetBounds()); 1127RectangleF rectangle = new(1f, 1f, 2f, 2f); 1142gp.GetBounds().Should().BeApproximately(new(60f, 60f, 43.3f, 48.3f), precision: 0.1f); 1297gp.Warp([new(0, 0)], new RectangleF(10, 20, 30, 40), matrix); 1307gp.Warp([new(0, 0)], new RectangleF(10, 20, 30, 40), matrix, (WarpMode)int.MinValue); 1599gp.AddRectangle(new RectangleF(10, 10, 20, 20)); 1617new(10, 10, 20, 20), 1618new(20, 20, 10, 10) 1714yield return new object[] { new Rectangle(1, 1, 2, 2), 0f, new RectangleF(0.5f, 0.5f, 3.0f, 3.0f) }; 1715yield return new object[] { new Rectangle(1, 1, 2, 2), 0.5f, new RectangleF(0.5f, 0.5f, 3.0f, 3.0f) }; 1716yield return new object[] { new Rectangle(1, 1, 2, 2), 1.0f, new RectangleF(0.5f, 0.5f, 3.0f, 3.0f) }; 1717yield return new object[] { new Rectangle(1, 1, 2, 2), 1.1f, new RectangleF(0.45f, 0.45f, 3.10f, 3.10f) }; 2079path.GetBounds().Should().BeApproximately(new(1f, 1f, 1f, 1f), precision: 0.000001f); 2095path.GetBounds().Should().BeApproximately(new(2.99962401f, 2.01370716f, 0f, 0.0137047768f), Delta); 2112path.GetBounds().Should().BeApproximately(new(1f, 1f, 3f, 3f), Delta); 2128path.GetBounds().Should().BeApproximately(new(1f, 1f, 1f, 1f), Delta); 2138path.GetBounds().Should().BeApproximately(new(0.8333333f, 0.8333333f, 2.33333278f, 2.33333278f), Delta); 2154path.GetBounds().Should().BeApproximately(new(1f, 1f, 2f, 2f), Delta); 2164path.GetBounds().Should().BeApproximately(new(1f, 1f, 2f, 2f), Delta); 2180path.GetBounds().Should().BeApproximately(new(2f, 2f, 0.9999058f, 0.0274119377f), Delta); 2197path.GetBounds().Should().BeApproximately(new(1f, 1f, 2f, 2f), Delta); 2381path.AddRoundedRectangle(new RectangleF(10, 10, 20, 20), new(5, 5));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (15)
12yield return new object[] { new Point(0, 0), new Point(2, 2), Color.Empty, Color.Empty, new RectangleF(0, 0, 2, 2) }; 13yield return new object[] { new Point(1, 0), new Point(0, 0), Color.Empty, Color.Red, new RectangleF(0, -0.5f, 1, 1) }; 14yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Plum, Color.Red, new RectangleF(1, 2, 3, 4) }; 15yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Red, Color.Red, new RectangleF(1, 2, 3, 4) }; 16yield return new object[] { new Point(-1, -2), new Point(4, 6), Color.Red, Color.Plum, new RectangleF(-1, -2, 5, 8) }; 17yield return new object[] { new Point(-4, -6), new Point(1, 2), Color.Black, Color.Wheat, new RectangleF(-4, -6, 5, 8) }; 18yield return new object[] { new Point(4, 6), new Point(-1, -2), Color.Black, Color.Wheat, new RectangleF(-1, -2, 5, 8) }; 19yield return new object[] { new Point(4, 6), new Point(1, 2), Color.Black, Color.Wheat, new RectangleF(1, 2, 3, 4) }; 207AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0f)); 209AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 211AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true)); 218AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0f)); 220AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 222AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true)); 231Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new RectangleF(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode));
System\Drawing\Drawing2D\MatrixTests.cs (2)
149Assert.Throws<ExternalException>(() => new Matrix(new RectangleF(1, 1, 0, 1), new PointF[3])); 156Assert.Throws<ExternalException>(() => new Matrix(new RectangleF(1, 1, 1, 0), new PointF[3]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (1)
34private readonly RectangleF _defaultRectangle = new(1, 2, 19, 28);
System\Drawing\Graphics_DrawBezierTests.cs (1)
112AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90));
System\Drawing\Graphics_GetContextTests.Core.cs (4)
71Assert.Equal(new RectangleF(0, 0, 9, 10), clip.GetBounds(graphics)); 90Assert.Equal(new RectangleF(1, 2, 9, 10), clip.GetBounds(graphics)); 111Assert.Equal(new RectangleF(0, 0, 8, 8), clip.GetBounds(graphics)); 129Assert.Equal(new RectangleF(0, 0, 8, 8), clip.GetBounds(graphics));
System\Drawing\Graphics_GetContextTests.cs (4)
73Assert.Equal(new RectangleF(0, 0, 9, 10), region.GetBounds(graphics)); 91Assert.Equal(new RectangleF(1, 2, 9, 10), region.GetBounds(graphics)); 112Assert.Equal(new RectangleF(0, 0, 8, 8), region.GetBounds(graphics)); 134Assert.Equal(new RectangleF(0, 0, 8, 8), region.GetBounds(graphics));
System\Drawing\GraphicsTests.Core.cs (10)
75AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, new RectangleF(0f, 0f, 1f, 1f))); 88AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 102Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 119AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 129AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, new RectangleF(0, 0, 1, 1), 0, 90)); 142AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90)); 153AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 0, 1), 0, 90)); 164AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 0), 0, 90)); 178Assert.Throws<InvalidOperationException>(() => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90)); 195AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90));
System\Drawing\GraphicsTests.cs (20)
1963AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, new RectangleF(0, 0, 1, 1), 0, 90)); 1977AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 1989AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 0, 1), 0, 90)); 2001AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90)); 2016Assert.Throws<InvalidOperationException>(() => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2035AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2172AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, new RectangleF(0, 0, 1, 1))); 2186AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2201Assert.Throws<InvalidOperationException>(() => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2220AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2231AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, new RectangleF(0, 0, 1, 1), 0, 90)); 2245AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2257AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 0, 1), 0, 90)); 2269AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90)); 2284Assert.Throws<InvalidOperationException>(() => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2303AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2803Assert.Equal(new RectangleF(-4194304, -4194304, 8388608, 8388608), graphics.ClipBounds); 2836RectangleF rectF = new(10.5f, 10.5f, 50.5f, 50.5f); 2984graphics.DrawRoundedRectangle(Pens.Red, new RectangleF(0, 0, 10, 10), new(2, 2)); 3002graphics.FillRoundedRectangle(Brushes.Green, new RectangleF(0, 0, 10, 10), new(2, 2));
System\Drawing\Imaging\MetafileTests.cs (1)
38private readonly RectangleF _rectangleF = new(0, 0, 64, 64);
System\Drawing\RegionTests.cs (194)
47Assert.Equal(new RectangleF(-4194304, -4194304, 8388608, 8388608), region.GetBounds(s_graphic)); 61Assert.Equal(new RectangleF(x, y, width, height), region.GetBounds(s_graphic)); 72RectangleF rectangle = new(x, y, width, height); 174new(1, 2, 3, 3), 175new(1, 5, 9, 1), 176new(4, 6, 6, 6) 178Assert.Equal(new RectangleF(1, 2, 9, 10), region.GetBounds(s_graphic)); 282new Region(new RectangleF(10, 10, 100, 100)), 283new RectangleF[] { new(40, 60, 100, 20) }, 284new RectangleF[] { new(110, 60, 30, 20) } 289new Region(new RectangleF(70, 10, 100, 100)), 290new RectangleF[] { new(40, 60, 100, 20) }, 291new RectangleF[] { new(40, 60, 30, 20) } 296new Region(new RectangleF(40, 100, 100, 100)), 297new RectangleF[] { new(70, 80, 50, 40) }, 298new RectangleF[] { new(70, 80, 50, 20) } 303new Region(new RectangleF(40, 10, 100, 100)), 304new RectangleF[] { new(70, 80, 50, 40) }, 305new RectangleF[] { new(70, 110, 50, 10) } 310new Region(new RectangleF(30, 30, 80, 80)), 313new(45, 45, 200, 200), 314new(160, 260, 10, 10), 315new(170, 260, 10, 10), 317new RectangleF[] { new(170, 260, 10, 10) } 330new RectangleF[] { new(1, 2, 3, 4) }, 363new(60, 60, 30, 10), 364new(20, 80, 20, 10) 380new(5, -5, 2, 10), 381new(-5, 5, 12, 2) 395new(-4194304, -4194304, 8388608, 4194306), 396new(-4194304, 2, 4194305, 4), 397new(4, 2, 4194300, 4), 398new(-4194304, 6, 8388608, 4194298) 491new(80, 40, 30, 70), 492new(50, 110, 60, 10) 545yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new RectangleF(1, 2, 3, 4)), true }; 627new RectangleF[] { new(500, 30, 60, 80) }, 635new RectangleF[] { new(500, 30, 60, 80) } 641new RectangleF[] { new(520, 40, 60, 80) }, 644new(-4194304, -4194304, 8388608, 4194344), 645new(-4194304, 40, 4194824, 80), 646new(580, 40, 4193724, 80), 647new(-4194304, 120, 8388608, 4194184) 662new RectangleF[] { new(40, 60, 100, 20) }, 665new(10, 10, 100, 50), 666new(10, 60, 30, 20), 667new(10, 80, 100, 30) 675new RectangleF[] { new(40, 60, 100, 20) }, 678new(70, 10, 100, 50), 679new(140, 60, 30, 20), 680new(70, 80, 100, 30) 688new RectangleF[] { new(70, 80, 50, 40) }, 691new(40, 100, 30, 20), 692new(120, 100, 20, 20), 693new(40, 120, 100, 80) 701new RectangleF[] { new(70, 80, 50, 40) }, 704new(40, 10, 100, 70), 705new(40, 80, 30, 30), 706new(120, 80, 20, 30) 716new(45, 45, 200, 200), 717new(160, 260, 10, 10), 718new(170, 260, 10, 10) 722new(30, 30, 80, 15), 723new(30, 45, 15, 65) 731new RectangleF[] { new(30, 70, 150, 40) }, 732new RectangleF[] { new(50, 110, 100, 90) } 739new RectangleF[] { new(40, 10, 100, 150) }, 740new RectangleF[] { new(140, 60, 30, 70) } 747new RectangleF[] { new(100, 10, 100, 150) }, 748new RectangleF[] { new(70, 60, 30, 70) } 755new RectangleF[] { new(10, 80, 140, 150) }, 756new RectangleF[] { new(20, 20, 100, 60) } 762new RectangleF[] { new(170, 40, 60, 80) }, 765new(130, 30, 60, 10), 766new(130, 40, 40, 70) 791using Region region = new(new RectangleF(20, 20, 20, 20)); 792using Region union = new(new RectangleF(20, 80, 20, 10)); 794union.Union(new RectangleF(60, 60, 30, 10)); 796Assert.Equal([new(20, 20, 20, 20)], region.GetRegionScans(matrix)); 920Assert.Equal(new RectangleF(1, 2, 3, 4), newRegion.GetBounds(s_graphic)); 1015Assert.Equal([new(1, 2, 3, 4)], region.GetRegionScans(emptyMatrix)); 1016Assert.Equal([new(15, 23, 15, 24)], region.GetRegionScans(matrix)); 1055Assert.Equal(new RectangleF(-5, -5, 10, 10), rects[0]); 1063new RectangleF[] { new(500, 30, 60, 80) }, 1064new RectangleF[] { new(500, 30, 60, 80) } 1069new RectangleF[] { new(500, 30, 60, 80) }, 1083new RectangleF[] { new(520, 40, 60, 80) }, 1096new Region(new RectangleF(260, 30, 60, 80)), 1097new RectangleF[] { new(290, 40, 60, 90) }, 1098new RectangleF[] { new(290, 40, 30, 70) } 1103new Region(new RectangleF(20, 330, 40, 50)), 1106new(50, 340, 40, 50), 1107new(70, 360, 30, 50), 1108new(80, 400, 30, 10) 1187Assert.Equal([new(-5, -5, 10, 10)], region.GetRegionScans(matrix)); 1211region.Intersect(new RectangleF(5, 5, -10, -10)); 1215Assert.Equal([new(-5, -5, 10, 10)], region.GetRegionScans(matrix)); 1425AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4))); 1429AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4), s_graphic)); 1472Assert.Equal(new RectangleF(-4194304, -4194304, 8388608, 8388608), region.GetBounds(s_graphic)); 1491new RectangleF[] { new(500, 30, 60, 80) }, 1492new RectangleF[] { new(500, 30, 60, 80) } 1499new RectangleF[] { new(500, 30, 60, 80) } 1505new RectangleF[] { new(520, 30, 60, 80) }, 1506new RectangleF[] { new(500, 30, 80, 80) } 1512new RectangleF[] { new(520, 40, 60, 80) }, 1515new(500, 30, 60, 10), 1516new(500, 40, 80, 70), 1517new(520, 110, 60, 10), 1524new RectangleF[] { new(520, 40, 60, 80) }, 1541new(20, 80, 20, 10), 1542new(60, 60, 30, 10) 1546new(20, 20, 20, 20), 1547new(60, 60, 30, 10), 1548new(20, 80, 20, 10) 1557new(50, 190, 40, 50), 1558new(70, 210, 30, 50) 1562new(20, 180, 40, 10), 1563new(20, 190, 70, 20), 1564new(20, 210, 80, 20), 1565new(50, 230, 50, 10), 1566new(70, 240, 30, 20) 1575new(50, 340, 40, 50), 1576new(70, 360, 30, 50), 1577new(80, 400, 30, 10) 1581new(20, 330, 40, 10), 1582new(20, 340, 70, 20), 1583new(20, 360, 80, 20), 1584new(50, 380, 50, 10), 1585new(70, 390, 30, 10), 1586new(70, 400, 40, 10) 1595new(100, 100, 60, 60), 1596new(200, 200, 80, 80) 1600new(10, 20, 50, 50), 1601new(100, 100, 60, 60), 1602new(200, 200, 80, 80) 1610new RectangleF[] { new(40, 60, 100, 20) }, 1613new(10, 10, 100, 50), 1614new(10, 60, 130, 20), 1615new(10, 80, 100, 30) 1623new RectangleF[] { new(40, 60, 100, 20) }, 1626new(70, 10, 100, 50), 1627new(40, 60, 130, 20), 1628new(70, 80, 100, 30) 1636new RectangleF[] { new(70, 80, 50, 40) }, 1639new(70, 80, 50, 20), 1640new(40, 100, 100, 100) 1648new RectangleF[] { new(70, 80, 50, 40) }, 1651new(40, 10, 100, 100), 1652new(70, 110, 50, 10) 1662new(45, 45, 200, 200), 1663new(160, 260, 10, 10), 1664new(170, 260, 10, 10) 1668new(30, 30, 80, 15), 1669new(30, 45, 215, 65), 1670new(45, 110, 200, 135), 1671new(160, 260, 20, 10) 1807using Region region = new(new RectangleF(1, 2, 3, 4)); 1810Assert.Equal([new(1, 2, 3, 4)], region.GetRegionScans(matrix)); 1816using Region region = new(new RectangleF(1, 2, 3, 4)); 1823Assert.Equal([new(15, 23, 15, 24)], region.GetRegionScans(emptyMatrix)); 1842Assert.Equal([new(-4194304, -4194304, 8388608, 8388608)], region.GetRegionScans(emptyMatrix)); 1856Assert.Equal([new(-20, -5, 40, 10)], region.GetRegionScans(emptyMatrix)); 1869Assert.Equal([new(-10, 5, 40, 10)], region.GetRegionScans(emptyMatrix)); 1892using Region region = new(new RectangleF(1, 2, 3, 4)); 1895Assert.Equal([new(1 + dx, 2 + dy, 3, 4)], region.GetRegionScans(matrix)); 1907Assert.Equal([new(0, 0, 20, 20)], region.GetRegionScans(matrix)); 1915using Region region = new(new RectangleF(1, 2, 3, 4)); 1918Assert.Equal([new(1 + dx, 2 + dy, 3, 4)], region.GetRegionScans(matrix)); 1930Assert.Equal([new(0, 0, 20, 20)], region.GetRegionScans(matrix)); 1942Assert.Equal([new(-4194304, -4194304, 8388608, 8388608)], region.GetRegionScans(matrix)); 1953using Region region = new(new RectangleF(1, 2, 3, 4)); 1975new Region(new RectangleF(500, 30, 60, 80)), 1976new RectangleF[] { new(500, 30, 60, 80) }, 1982new Region(new RectangleF(500, 30, 60, 80)), 1984new RectangleF[] { new(500, 30, 60, 80) } 1989new Region(new RectangleF(0, 0, 0, 0)), 1990new RectangleF[] { new(500, 30, 60, 80) }, 1991new RectangleF[] { new(500, 30, 60, 80) } 1997new RectangleF[] { new(520, 40, 60, 80) }, 2000new(-4194304, -4194304, 8388608, 4194344), 2001new(-4194304, 40, 4194824, 80), 2002new(580, 40, 4193724, 80), 2003new(-4194304, 120, 8388608, 4194184) 2016new Region(new RectangleF(380, 30, 60, 80)), 2017new RectangleF[] { new(410, 40, 60, 80) }, 2020new(380, 30, 60, 10), 2021new(380, 40, 30, 70), 2022new(440, 40, 30, 70), 2023new(410, 110, 60, 10) 2055new(-4194304, -4194304, 8388608, 4194306), 2056new(-4194304, 2, 4194305, 4), 2057new(4, 2, 4194300, 4), 2058new(-4194304, 6, 8388608, 4194298)
System.Drawing.Primitives (5)
System\Drawing\RectangleF.cs (5)
76public static explicit operator RectangleF(Vector4 vector) => new RectangleF(vector); 82new RectangleF(left, top, right - left, bottom - top); 280return new RectangleF(x1, y1, x2 - x1, y2 - y1); 302return new RectangleF(x1, y1, x2 - x1, y2 - y1); 323public static implicit operator RectangleF(Rectangle r) => new RectangleF(r.X, r.Y, r.Width, r.Height);
System.Private.Windows.Core (1)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
232value = new RectangleF(
System.Private.Windows.Core.Tests (2)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
57new RectangleF(1, 2, 3, 4), 1010public RectangleF RectangleF = new(1, 2, 3, 4);
System.Windows.Forms (1)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
1060focusRectangle = new RectangleF(regionRectangles[0].Location, SizeF.Empty);
System.Windows.Forms.Design (1)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
417new RectangleF(0.0f, 0.0f, ClientSize.Width, ClientSize.Height),
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
184RectangleF sourceBounds = new(0, 0, bitmap.Size.Width, bitmap.Size.Height); 185RectangleF destinationBounds = new(0, 0, desiredSize.Width, desiredSize.Height);
System.Windows.Forms.Tests (11)
System\Resources\ResxDataNodeTests.cs (1)
89new RectangleF(10.0f, 20.0f, 30.0f, 40.0f),
System\Windows\Forms\ControlPaintTests.cs (10)
1902yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), null }; 1904yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, -3, -4), new StringFormat() }; 1905yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1906yield return new object[] { s, SystemFonts.MenuFont, Color.Black, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1907yield return new object[] { s, SystemFonts.MenuFont, Color.White, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1908yield return new object[] { s, SystemFonts.MenuFont, Color.Transparent, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1909yield return new object[] { s, SystemFonts.MenuFont, Color.Empty, new RectangleF(1, 2, 3, 4), new StringFormat() }; 1933ControlPaint.DrawStringDisabled(graphics, s, null, Color.Red, new RectangleF(1, 2, 3, 4), null); 1936ControlPaint.DrawStringDisabled(graphics, s, null, Color.Red, new RectangleF(1, 2, 3, 4), null); 1943Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat()));
400 references to RectangleF
BinaryFormatTests (2)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
36typeof(RectangleF),
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
185default(RectangleF)
netstandard (1)
netstandard.cs (1)
753[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.RectangleF))]
PresentationCore (2)
System\Windows\Nrbf\SerializationRecordExtensions.cs (2)
57/// Tries to get this object as a <see cref="RectangleF"/>. 68|| !classInfo.TypeNameMatches(typeof(RectangleF))
PresentationCore.Tests (12)
FluentAssertions\FluentAssertExtensions.cs (10)
13/// current <see cref="RectangleF"/>. 15public static RectangleFAssertions Should(this RectangleF actualValue) => new(actualValue); 24/// Asserts a <see cref="RectangleF"/> value approximates another value as close as possible. 30RectangleF expectedValue, 44/// Asserts that two <see cref="RectangleF"/> collections contain the same items in the same order 48public static AndConstraint<GenericCollectionAssertions<RectangleF>> BeApproximatelyEquivalentTo( 49this GenericCollectionAssertions<RectangleF> parent, 50IEnumerable<RectangleF> expectation, 56(RectangleF actual, RectangleF expected) =>
FluentAssertions\RectangleFAssertions.cs (2)
5public class RectangleFAssertions(RectangleF value) 7public RectangleF Subject { get; } = value;
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
178typeof(RectangleF),
System.Drawing (1)
System.Drawing.cs (1)
140[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.RectangleF))]
System.Drawing.Common (1)
Special\Forwards.cs (1)
11[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.RectangleF))]
System.Drawing.Common.Tests (277)
mono\System.Drawing.Imaging\BmpCodecTests.cs (5)
46RectangleF rect = bmp.GetBounds(ref unit); 112RectangleF rect = bmp.GetBounds(ref unit); 178RectangleF rect = bmp.GetBounds(ref unit); 365RectangleF rect = bmp.GetBounds(ref unit); 496RectangleF rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\GifCodecTests.cs (1)
43RectangleF rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\IconCodecTests.cs (6)
70RectangleF rect = bmp.GetBounds(ref unit); 219RectangleF rect = bmp.GetBounds(ref unit); 424RectangleF rect = bmp.GetBounds(ref unit); 646RectangleF rect = bmp.GetBounds(ref unit); 904RectangleF rect = bmp.GetBounds(ref unit); 1837RectangleF rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\JpegCodecTests.cs (2)
47RectangleF rect = bmp.GetBounds(ref unit); 174RectangleF rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\PngCodecTests.cs (3)
45RectangleF rect = bmp.GetBounds(ref unit); 247RectangleF rect = bmp.GetBounds(ref unit); 355RectangleF rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\TiffCodecTests.cs (1)
45RectangleF rect = bmp.GetBounds(ref unit);
mono\System.Drawing\GraphicsTests.cs (41)
40private RectangleF[] _rects; 148RectangleF[] rects; 237RectangleF[] rects; 366private static void Compare(string msg, RectangleF b1, RectangleF b2) 379RectangleF bounds = g.Clip.GetBounds(g); 393RectangleF bounds = g.Clip.GetBounds(g); 439private static void CheckBounds(string msg, RectangleF bounds, float x, float y, float w, float h) 478RectangleF clip = new Rectangle(0, 0, 8, 8); 853RectangleF[] rectf = [ 891RectangleF[] rectf = [ 1166Assert.Throws<ArgumentNullException>(() => g.FillRectangles(null, new RectangleF[1])); 1174Assert.Throws<ArgumentNullException>(() => g.FillRectangles(Brushes.Red, (RectangleF[])null)); 1182Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<RectangleF>())); 1900RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 1925RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 1966RectangleF layout_rect = new(0.0f, 0.0f, size.Width, size.Height); 1971RectangleF bounds_none = regions[0].GetBounds(g); 1976RectangleF bounds_show = regions[0].GetBounds(g); 1986RectangleF bounds_hide = regions[0].GetBounds(g); 2005private static Region[] Measure_Helper(Graphics gfx, RectangleF rect, bool useSpan) 2029RectangleF zb = zero[i].GetBounds(gfx); 2030RectangleF sb = small[i].GetBounds(gfx); 2041RectangleF zb = zero[i].GetBounds(gfx); 2042RectangleF mb = max[i].GetBounds(gfx); 2060RectangleF mb = min[i].GetBounds(gfx); 2071RectangleF mb = neg[i].GetBounds(gfx); 2201RectangleF noclip = g.VisibleClipBounds; 2209RectangleF clip = g.VisibleClipBounds; 2216RectangleF rotclip = g.VisibleClipBounds; 2234RectangleF noclip = g.VisibleClipBounds; 2242RectangleF clipbound = g.ClipBounds; 2248RectangleF clip = g.VisibleClipBounds; 2255RectangleF rotclipbound = g.ClipBounds; 2261RectangleF rotclip = g.VisibleClipBounds; 2279RectangleF vcb = g.VisibleClipBounds; 2286RectangleF rvcb = g.VisibleClipBounds; 2298RectangleF vcb = g.VisibleClipBounds; 2305RectangleF svcb = g.VisibleClipBounds; 2317RectangleF vcb = g.VisibleClipBounds; 2324RectangleF tvcb = g.VisibleClipBounds;
mono\System.Imaging\MetafileTest.cs (2)
238Metafile mf = new(hdc, default(RectangleF)); 317RectangleF rect = new(0, 0, size.Width, size.Height);
System\Drawing\BitmapTests.cs (1)
406using Bitmap clone = bitmap.Clone((RectangleF)rectangle, format);
System\Drawing\Drawing2D\GraphicsPathTests.cs (6)
759RectangleF[] rectFloat = [new(1, 1, 2, 2), new(3, 3, 4, 4)]; 783RectangleF[] rectFloat = [ 806AssertExtensions.Throws<ArgumentNullException>("rects", () => gp.AddRectangles((RectangleF[])null)); 1127RectangleF rectangle = new(1f, 1f, 2f, 2f); 1615gp.AddRectangles(new RectangleF[2] 1723Rectangle rectangle, float penWidth, RectangleF expectedBounds)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (5)
24public void Ctor_PointF_PointF_Color_Color(Point point1, Point point2, Color color1, Color color2, RectangleF expectedRectangle) 51public void Ctor_Point_Point_Color_Color(Point point1, Point point2, Color color1, Color color2, RectangleF expectedRectangle) 104using LinearGradientBrush brush = new((RectangleF)rectangle, color1, color2, linearGradientMode); 147using LinearGradientBrush brush = new((RectangleF)rectangle, color1, color2, angle); 190using LinearGradientBrush brush = new((RectangleF)rectangle, color1, color2, angle, isAngleScalable);
System\Drawing\Drawing2D\MatrixTests.cs (1)
131AssertExtensions.Throws<ArgumentNullException>("plgpts", () => new Matrix(default(RectangleF), null));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (1)
34private readonly RectangleF _defaultRectangle = new(1, 2, 19, 28);
System\Drawing\GraphicsTests.cs (8)
2100AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangles(null, new RectangleF[2])); 2112AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2])); 2122AssertExtensions.Throws<ArgumentNullException>("rects", () => graphics.DrawRectangles(pen, (RectangleF[])null)); 2132AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<RectangleF>())); 2145Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangles(pen, new RectangleF[2])); 2162AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2])); 2800private static void VerifyGraphics(Graphics graphics, RectangleF expectedVisibleClipBounds) 2836RectangleF rectF = new(10.5f, 10.5f, 50.5f, 50.5f);
System\Drawing\Imaging\MetafileTests.cs (2)
38private readonly RectangleF _rectangleF = new(0, 0, 64, 64); 519fileName, g.GetHdc(), default(RectangleF), MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description))
System\Drawing\RegionTests.cs (179)
72RectangleF rectangle = new(x, y, width, height); 283new RectangleF[] { new(40, 60, 100, 20) }, 284new RectangleF[] { new(110, 60, 30, 20) } 290new RectangleF[] { new(40, 60, 100, 20) }, 291new RectangleF[] { new(40, 60, 30, 20) } 297new RectangleF[] { new(70, 80, 50, 40) }, 298new RectangleF[] { new(70, 80, 50, 20) } 304new RectangleF[] { new(70, 80, 50, 40) }, 305new RectangleF[] { new(70, 110, 50, 10) } 311new RectangleF[] 317new RectangleF[] { new(170, 260, 10, 10) } 323new RectangleF[] { RectangleF.Empty }, 324Array.Empty<RectangleF>() 330new RectangleF[] { new(1, 2, 3, 4) }, 331Array.Empty<RectangleF>() 337public void Complement_Region_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 341foreach (RectangleF rect in rectangles) 424public void Complement_Rectangle_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 428foreach (RectangleF rect in rectangles) 440public void Complement_RectangleF_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 444foreach (RectangleF rect in rectangles) 456public void Complement_GraphicsPath_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 460foreach (RectangleF rect in rectangles) 521AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(RectangleF))); 627new RectangleF[] { new(500, 30, 60, 80) }, 628Array.Empty<RectangleF>() 634new RectangleF[] { RectangleF.Empty }, 635new RectangleF[] { new(500, 30, 60, 80) } 641new RectangleF[] { new(520, 40, 60, 80) }, 642new RectangleF[] 654new RectangleF[] { RectangleF.Empty }, 655new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 662new RectangleF[] { new(40, 60, 100, 20) }, 663new RectangleF[] 675new RectangleF[] { new(40, 60, 100, 20) }, 676new RectangleF[] 688new RectangleF[] { new(70, 80, 50, 40) }, 689new RectangleF[] 701new RectangleF[] { new(70, 80, 50, 40) }, 702new RectangleF[] 714new RectangleF[] 720new RectangleF[] 731new RectangleF[] { new(30, 70, 150, 40) }, 732new RectangleF[] { new(50, 110, 100, 90) } 739new RectangleF[] { new(40, 10, 100, 150) }, 740new RectangleF[] { new(140, 60, 30, 70) } 747new RectangleF[] { new(100, 10, 100, 150) }, 748new RectangleF[] { new(70, 60, 30, 70) } 755new RectangleF[] { new(10, 80, 140, 150) }, 756new RectangleF[] { new(20, 20, 100, 60) } 762new RectangleF[] { new(170, 40, 60, 80) }, 763new RectangleF[] 773public void Exclude_Region_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 777foreach (RectangleF rect in rectangles) 831public void Exclude_Rectangle_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 835foreach (RectangleF rect in rectangles) 847public void Exclude_RectangleF_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 851foreach (RectangleF rect in rectangles) 863public void Exclude_GraphicsPath_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 867foreach (RectangleF rect in rectangles) 904AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(RectangleF))); 1053RectangleF[] rects = clipRegion.GetRegionScans(matrix); 1063new RectangleF[] { new(500, 30, 60, 80) }, 1064new RectangleF[] { new(500, 30, 60, 80) } 1069new RectangleF[] { new(500, 30, 60, 80) }, 1070Array.Empty<RectangleF>() 1076new RectangleF[] { RectangleF.Empty }, 1077Array.Empty<RectangleF>() 1083new RectangleF[] { new(520, 40, 60, 80) }, 1084new RectangleF[] { new Rectangle(520, 40, 60, 80) } 1090new RectangleF[] { RectangleF.Empty }, 1091Array.Empty<RectangleF>() 1097new RectangleF[] { new(290, 40, 60, 90) }, 1098new RectangleF[] { new(290, 40, 30, 70) } 1104new RectangleF[] 1110Array.Empty<RectangleF>() 1116public void Intersect_Region_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1120foreach (RectangleF rect in rectangles) 1164public void Intersect_Rectangle_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1168foreach (RectangleF rect in rectangles) 1192public void Intersect_RectangleF_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1196foreach (RectangleF rect in rectangles) 1220public void Intersect_GraphicsPath_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1224foreach (RectangleF rect in rectangles) 1261AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(RectangleF))); 1334Assert.Equal(expected, region.IsVisible((RectangleF)rectangle)); 1338Assert.Equal(expected, region.IsVisible((RectangleF)rectangle, s_graphic)); 1339Assert.Equal(expected, region.IsVisible((RectangleF)rectangle, disposedGraphics)); 1340Assert.Equal(expected, region.IsVisible((RectangleF)rectangle, null)); 1445Assert.Equal(RectangleF.Empty, region.GetBounds(s_graphic)); 1491new RectangleF[] { new(500, 30, 60, 80) }, 1492new RectangleF[] { new(500, 30, 60, 80) } 1498new RectangleF[] { RectangleF.Empty }, 1499new RectangleF[] { new(500, 30, 60, 80) } 1505new RectangleF[] { new(520, 30, 60, 80) }, 1506new RectangleF[] { new(500, 30, 80, 80) } 1512new RectangleF[] { new(520, 40, 60, 80) }, 1513new RectangleF[] 1524new RectangleF[] { new(520, 40, 60, 80) }, 1525new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 1531new RectangleF[] { RectangleF.Empty }, 1532new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 1539new RectangleF[] 1544new RectangleF[] 1555new RectangleF[] 1560new RectangleF[] 1573new RectangleF[] 1579new RectangleF[] 1593new RectangleF[] 1598new RectangleF[] 1610new RectangleF[] { new(40, 60, 100, 20) }, 1611new RectangleF[] 1623new RectangleF[] { new(40, 60, 100, 20) }, 1624new RectangleF[] 1636new RectangleF[] { new(70, 80, 50, 40) }, 1637new RectangleF[] 1648new RectangleF[] { new(70, 80, 50, 40) }, 1649new RectangleF[] 1660new RectangleF[] 1666new RectangleF[] 1678public void Union_Region_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1682foreach (RectangleF rect in rectangles) 1727public void Union_Rectangle_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1731foreach (RectangleF rect in rectangles) 1743public void Union_RectangleF_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1747foreach (RectangleF rect in rectangles) 1759public void Union_GraphicsPath_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 1763foreach (RectangleF rect in rectangles) 1800AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(RectangleF))); 1976new RectangleF[] { new(500, 30, 60, 80) }, 1977Array.Empty<RectangleF>() 1983new RectangleF[] { RectangleF.Empty }, 1984new RectangleF[] { new(500, 30, 60, 80) } 1990new RectangleF[] { new(500, 30, 60, 80) }, 1991new RectangleF[] { new(500, 30, 60, 80) } 1997new RectangleF[] { new(520, 40, 60, 80) }, 1998new RectangleF[] 2010new RectangleF[] { RectangleF.Empty }, 2011new RectangleF[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) } 2017new RectangleF[] { new(410, 40, 60, 80) }, 2018new RectangleF[] 2030public void Xor_Region_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 2034foreach (RectangleF rect in rectangles) 2085public void Xor_Rectangle_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 2089foreach (RectangleF rect in rectangles) 2101public void Xor_RectangleF_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 2105foreach (RectangleF rect in rectangles) 2117public void Xor_GraphicsPath_Success(Region region, RectangleF[] rectangles, RectangleF[] expectedScans) 2121foreach (RectangleF rect in rectangles) 2158AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(RectangleF)));
System\Drawing\TextureBrushTests.cs (13)
113using TextureBrush brush = new(image, (RectangleF)rectangle); 167using TextureBrush brush = new(image, wrapMode, (RectangleF)rectangle); 223using TextureBrush brush = new(image, (RectangleF)rectangle, attributes); 244AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, RectangleF.Empty)); 246AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, RectangleF.Empty, null)); 248AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, RectangleF.Empty)); 260AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty)); 262AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty, null)); 264AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, RectangleF.Empty)); 275Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode, RectangleF.Empty)); 293Assert.Throws<ExternalException>(() => new TextureBrush(image, (RectangleF)rectangle)); 295Assert.Throws<ExternalException>(() => new TextureBrush(image, WrapMode.Tile, (RectangleF)rectangle)); 297Assert.Throws<ExternalException>(() => new TextureBrush(image, (RectangleF)rectangle, null));
System.Drawing.Primitives (59)
System\Drawing\Rectangle.cs (3)
177public static Rectangle Ceiling(RectangleF value) 192public static Rectangle Truncate(RectangleF value) 207public static Rectangle Round(RectangleF value)
System\Drawing\RectangleF.cs (56)
15public struct RectangleF : IEquatable<RectangleF> 18/// Initializes a new instance of the <see cref='System.Drawing.RectangleF'/> class. 20public static readonly RectangleF Empty; 28/// Initializes a new instance of the <see cref='System.Drawing.RectangleF'/> class with the specified location 40/// Initializes a new instance of the <see cref='System.Drawing.RectangleF'/> class with the specified location 52/// Initializes a new instance of the <see cref='System.Drawing.RectangleF'/> struct from the specified 64/// Creates a new <see cref="System.Numerics.Vector4"/> from this <see cref="System.Drawing.RectangleF"/>. 69/// Converts the specified <see cref="System.Drawing.RectangleF"/> to a <see cref="System.Numerics.Vector4"/>. 71public static explicit operator Vector4(RectangleF rectangle) => rectangle.ToVector4(); 74/// Converts the specified <see cref="System.Numerics.Vector2"/> to a <see cref="System.Drawing.RectangleF"/>. 76public static explicit operator RectangleF(Vector4 vector) => new RectangleF(vector); 79/// Creates a new <see cref='System.Drawing.RectangleF'/> with the specified location and size. 81public static RectangleF FromLTRB(float left, float top, float right, float bottom) => 86/// <see cref='System.Drawing.RectangleF'/>. 100/// Gets or sets the size of this <see cref='System.Drawing.RectangleF'/>. 115/// <see cref='System.Drawing.RectangleF'/>. 125/// <see cref='System.Drawing.RectangleF'/>. 134/// Gets or sets the width of the rectangular region defined by this <see cref='System.Drawing.RectangleF'/>. 143/// Gets or sets the height of the rectangular region defined by this <see cref='System.Drawing.RectangleF'/>. 153/// <see cref='System.Drawing.RectangleF'/> . 160/// <see cref='System.Drawing.RectangleF'/>. 167/// <see cref='System.Drawing.RectangleF'/>. 174/// <see cref='System.Drawing.RectangleF'/>. 180/// Tests whether this <see cref='System.Drawing.RectangleF'/> has a <see cref='System.Drawing.RectangleF.Width'/> or a <see cref='System.Drawing.RectangleF.Height'/> of 0. 186/// Tests whether <paramref name="obj"/> is a <see cref='System.Drawing.RectangleF'/> with the same location and 187/// size of this <see cref='System.Drawing.RectangleF'/>. 189public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is RectangleF && Equals((RectangleF)obj); 191public readonly bool Equals(RectangleF other) => this == other; 194/// Tests whether two <see cref='System.Drawing.RectangleF'/> objects have equal location and size. 196public static bool operator ==(RectangleF left, RectangleF right) => 200/// Tests whether two <see cref='System.Drawing.RectangleF'/> objects differ in location or size. 202public static bool operator !=(RectangleF left, RectangleF right) => !(left == right); 220public readonly bool Contains(RectangleF rect) => 224/// Gets the hash code for this <see cref='System.Drawing.RectangleF'/>. 247public static RectangleF Inflate(RectangleF rect, float x, float y) 249RectangleF r = rect; 257public void Intersect(RectangleF rect) 259RectangleF result = Intersect(rect, this); 271public static RectangleF Intersect(RectangleF a, RectangleF b) 289public readonly bool IntersectsWith(RectangleF rect) => 295public static RectangleF Union(RectangleF a, RectangleF b) 321/// <see cref='System.Drawing.RectangleF'/>. 323public static implicit operator RectangleF(Rectangle r) => new RectangleF(r.X, r.Y, r.Width, r.Height); 326/// Converts the <see cref='System.Drawing.RectangleF.Location'/> and <see cref='System.Drawing.RectangleF.Size'/> 327/// of this <see cref='System.Drawing.RectangleF'/> to a human-readable string.
System.Private.Windows.Core (8)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
212/// Writes a <see cref="RectangleF"/> in binary format. 214public static void WriteRectangleF(Stream stream, RectangleF value) 219new ClassInfo(1, typeof(RectangleF).FullName!, s_rectangleMemberNames), 705case RectangleF rectangle:
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
87{ Types.ToTypeName($"{Types.RectangleFType}"), typeof(RectangleF) }, 154|| type == typeof(RectangleF)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
212/// Tries to get this object as a <see cref="RectangleF"/>. 223|| !classInfo.TypeNameMatches(typeof(RectangleF))
System.Private.Windows.Core.Tests (1)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (1)
1010public RectangleF RectangleF = new(1, 2, 3, 4);
System.Private.Windows.Core.TestUtilities (12)
FluentAssertions\FluentAssertExtensions.cs (10)
16/// current <see cref="RectangleF"/>. 18public static RectangleFAssertions Should(this RectangleF actualValue) => new(actualValue); 27/// Asserts a <see cref="RectangleF"/> value approximates another value as close as possible. 33RectangleF expectedValue, 47/// Asserts that two <see cref="RectangleF"/> collections contain the same items in the same order 51public static AndConstraint<GenericCollectionAssertions<RectangleF>> BeApproximatelyEquivalentTo( 52this GenericCollectionAssertions<RectangleF> parent, 53IEnumerable<RectangleF> expectation, 59(RectangleF actual, RectangleF expected) =>
FluentAssertions\RectangleFAssertions.cs (2)
8public class RectangleFAssertions(RectangleF value) 10public RectangleF Subject { get; } = value;
System.Private.Windows.GdiPlus (6)
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (2)
13internal static RectangleF GetImageBounds(this IPointer<GpImage> image) 15RectangleF bounds;
Windows\Win32\Graphics\GdiPlus\RectF.cs (4)
11public static implicit operator RectangleF(RectF rect) => Unsafe.As<RectF, RectangleF>(ref rect); 12public static implicit operator RectF(RectangleF rectangle) => Unsafe.As<RectangleF, RectF>(ref rectangle);
System.Windows.Forms (11)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (7)
1027RectangleF focusRectangle = RectangleF.Empty; 1061foreach (RectangleF rect in regionRectangles) 1063focusRectangle = RectangleF.Union(focusRectangle, rect); 1230RectangleF focusRectangle, 1325Debug.Assert(focusRectangle != RectangleF.Empty, "focusRectangle should be initialized"); 1330foreach (RectangleF rect in regionRectangles)
System\Windows\Forms\Layout\TableLayout.cs (3)
113RectangleF displayRect = (RectangleF)container.DisplayRectangle; 1173private static void SetElementBounds(ContainerInfo containerInfo, RectangleF displayRectF)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
1945RectangleF layoutRectangle,
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
184RectangleF sourceBounds = new(0, 0, bitmap.Size.Width, bitmap.Size.Height); 185RectangleF destinationBounds = new(0, 0, desiredSize.Width, desiredSize.Height);
System.Windows.Forms.Tests (4)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
234default(RectangleF), 235new RectangleF[] { default },
System\Windows\Forms\ControlPaintTests.cs (2)
1903yield return new object[] { s, SystemFonts.MenuFont, Color.Red, RectangleF.Empty, new StringFormat() }; 1917RectangleF layoutRectangle, StringFormat format)