328 instantiations of RectangleF
PresentationCore (1)
System\Windows\Nrbf\SerializationRecordExtensions.cs (1)
77
value = new
RectangleF
(
System.Drawing.Common (19)
misc\DpiHelper.cs (2)
111
RectangleF sourceRect =
new
(0, 0, logicalImage.Size.Width, logicalImage.Size.Height);
112
RectangleF destRect =
new
(0, 0, deviceImageSize.Width, deviceImageSize.Height);
System\Drawing\Drawing2D\GraphicsPath.cs (1)
778
AddString(s, family, style, emSize, new
RectangleF
(origin.X, origin.Y, 0, 0), format);
System\Drawing\Graphics.cs (14)
1588
DrawString(s, font, brush, new
RectangleF
(x, y, 0, 0), null);
1593
DrawString(s, font, brush, new
RectangleF
(x, y, 0, 0), null);
1608
DrawString(s, font, brush, new
RectangleF
(point.X, point.Y, 0, 0), null);
1613
DrawString(s, font, brush, new
RectangleF
(point.X, point.Y, 0, 0), null);
1633
DrawString(s, font, brush, new
RectangleF
(x, y, 0, 0), format);
1638
DrawString(s, font, brush, new
RectangleF
(x, y, 0, 0), format);
1657
DrawString(s, font, brush, new
RectangleF
(point.X, point.Y, 0, 0), format);
1662
DrawString(s, font, brush, new
RectangleF
(point.X, point.Y, 0, 0), format);
1771
MeasureStringInternal(text, font,
new
(default, layoutArea), stringFormat, out charactersFitted, out linesFilled);
1782
MeasureStringInternal(text, font,
new
(default, layoutArea), stringFormat, out charactersFitted, out linesFilled);
1829
=> MeasureStringInternal(text, font,
new
(origin, default), stringFormat, out _, out _);
1834
=> MeasureStringInternal(text, font,
new
(origin, default), stringFormat, out _, out _);
1853
MeasureStringInternal(text, font,
new
(default, layoutArea), stringFormat, out _, out _);
1858
MeasureStringInternal(text, font,
new
(default, layoutArea), stringFormat, out _, out _);
System\Drawing\Region.cs (2)
299
public bool IsVisible(float x, float y, float width, float height) => IsVisible(new
RectangleF
(x, y, width, height), null);
303
public bool IsVisible(float x, float y, float width, float height, Graphics? g) => IsVisible(new
RectangleF
(x, y, width, height), g);
System.Drawing.Common.Tests (285)
mono\System.Drawing\BitmapTests.cs (1)
375
using Bitmap bmp_rotate = src.Clone(new
RectangleF
(0, 0, width, height), PixelFormat.Format32bppArgb);
mono\System.Drawing\GraphicsTests.cs (23)
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));
255
g.SetClip(new
RectangleF
(50, 40, 210, 220));
1037
GraphicsContainer gc = g.BeginContainer(new
RectangleF
(40, 30, 20, 10), new
RectangleF
(10, 20, 30, 40), GraphicsUnit.Inch);
1051
g.BeginContainer(new
RectangleF
(40, 30, 20, 10), new
RectangleF
(10, 20, 30, 40), unit);
1901
RectangleF layout_rect =
new
(0.0f, 0.0f, size.Width, size.Height);
1926
RectangleF layout_rect =
new
(0.0f, 0.0f, size.Width, size.Height);
1967
RectangleF layout_rect =
new
(0.0f, 0.0f, size.Width, size.Height);
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);
2209
g.Clip = new Region(new
RectangleF
(0, 0, 32, 32));
2242
g.Clip = new Region(new
RectangleF
(0, 0, 200, 200));
2402
Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new
RectangleF
(0, 0, 0, 0)));
2410
g.DrawImage(bmp, new
RectangleF
(0, 0, 0, 0));
2411
g.DrawImage(bmp, new
RectangleF
(20, 40, 0, 0));
2412
g.DrawImage(bmp, new
RectangleF
(10, 20, -1, 0));
2413
g.DrawImage(bmp, new
RectangleF
(20, 10, 0, -1));
mono\System.Imaging\MetafileTest.cs (1)
317
RectangleF rect =
new
(0, 0, size.Width, size.Height);
System\Drawing\BitmapTests.cs (5)
427
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new
RectangleF
(0, 0, width, height), bitmap.PixelFormat));
441
Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new
RectangleF
(x, y, width, height), bitmap.PixelFormat));
457
Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new
RectangleF
(0, 0, 1, 1), format));
465
Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new
RectangleF
(0, 0, 1, 1), PixelFormat.Format32bppArgb));
486
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new
RectangleF
(0, 0, 1, 1), PixelFormat.Format32bppArgb));
System\Drawing\Drawing2D\GraphicsPathTests.cs (35)
349
gpf.AddArc(new
RectangleF
(1, 1, 2, 2), Pi4, Pi4);
709
gpf.AddRectangle(new
RectangleF
(1, 1, 2, 2));
728
gpf.AddRectangle(new
RectangleF
(1, 1, 1, 1));
735
gpf.AddRectangle(new
RectangleF
(endF.X, endF.Y, 1, 1));
751
gpf.AddRectangle(new
RectangleF
(1f, 2f, width, height));
819
gpf.AddEllipse(new
RectangleF
(1, 1, 2, 2));
1010
gpf.AddString("mono", FontFamily.GenericMonospace, 0, 10, new
RectangleF
(10f, 10f, 10f, 10f), StringFormat.GenericDefault);
1030
gpf.AddString("mono", FontFamily.GenericMonospace, 0, -10, new
RectangleF
(10f, 10f, 10f, 10f), StringFormat.GenericDefault);
1040
gp1.AddString("mono", FontFamily.GenericMonospace, 0, 10, new
RectangleF
(10f, 10f, 10f, 10f), null);
1043
gp2.AddString("mono", FontFamily.GenericMonospace, 0, 10, new
RectangleF
(10f, 10f, 10f, 10f), StringFormat.GenericDefault);
1046
gp3.AddString("mono", FontFamily.GenericMonospace, 0, 10, new
RectangleF
(10f, 10f, 10f, 10f), StringFormat.GenericTypographic);
1073
gp.AddString(null, FontFamily.GenericMonospace, 0, 10, new
RectangleF
(10f, 10f, 10f, 10f), StringFormat.GenericDefault));
1093
Assert.Equal(new
RectangleF
(6f, 6f, 6f, 6f), gp.GetBounds());
1119
Assert.Equal(new
RectangleF
(0f, 0f, 0f, 0f), gp.GetBounds());
1127
RectangleF rectangle =
new
(1f, 1f, 2f, 2f);
1142
gp.GetBounds().Should().BeApproximately(
new
(60f, 60f, 43.3f, 48.3f), precision: 0.1f);
1297
gp.Warp([new(0, 0)], new
RectangleF
(10, 20, 30, 40), matrix);
1307
gp.Warp([new(0, 0)], new
RectangleF
(10, 20, 30, 40), matrix, (WarpMode)int.MinValue);
1599
gp.AddRectangle(new
RectangleF
(10, 10, 20, 20));
1617
new
(10, 10, 20, 20),
1618
new
(20, 20, 10, 10)
1714
yield return new object[] { new Rectangle(1, 1, 2, 2), 0f, new
RectangleF
(0.5f, 0.5f, 3.0f, 3.0f) };
1715
yield return new object[] { new Rectangle(1, 1, 2, 2), 0.5f, new
RectangleF
(0.5f, 0.5f, 3.0f, 3.0f) };
1716
yield return new object[] { new Rectangle(1, 1, 2, 2), 1.0f, new
RectangleF
(0.5f, 0.5f, 3.0f, 3.0f) };
1717
yield return new object[] { new Rectangle(1, 1, 2, 2), 1.1f, new
RectangleF
(0.45f, 0.45f, 3.10f, 3.10f) };
2079
path.GetBounds().Should().BeApproximately(
new
(1f, 1f, 1f, 1f), precision: 0.000001f);
2095
path.GetBounds().Should().BeApproximately(
new
(2.99962401f, 2.01370716f, 0f, 0.0137047768f), Delta);
2112
path.GetBounds().Should().BeApproximately(
new
(1f, 1f, 3f, 3f), Delta);
2128
path.GetBounds().Should().BeApproximately(
new
(1f, 1f, 1f, 1f), Delta);
2138
path.GetBounds().Should().BeApproximately(
new
(0.8333333f, 0.8333333f, 2.33333278f, 2.33333278f), Delta);
2154
path.GetBounds().Should().BeApproximately(
new
(1f, 1f, 2f, 2f), Delta);
2164
path.GetBounds().Should().BeApproximately(
new
(1f, 1f, 2f, 2f), Delta);
2180
path.GetBounds().Should().BeApproximately(
new
(2f, 2f, 0.9999058f, 0.0274119377f), Delta);
2197
path.GetBounds().Should().BeApproximately(
new
(1f, 1f, 2f, 2f), Delta);
2381
path.AddRoundedRectangle(new
RectangleF
(10, 10, 20, 20), new(5, 5));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (15)
10
yield return new object[] { new Point(0, 0), new Point(2, 2), Color.Empty, Color.Empty, new
RectangleF
(0, 0, 2, 2) };
11
yield return new object[] { new Point(1, 0), new Point(0, 0), Color.Empty, Color.Red, new
RectangleF
(0, -0.5f, 1, 1) };
12
yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Plum, Color.Red, new
RectangleF
(1, 2, 3, 4) };
13
yield return new object[] { new Point(1, 2), new Point(4, 6), Color.Red, Color.Red, new
RectangleF
(1, 2, 3, 4) };
14
yield return new object[] { new Point(-1, -2), new Point(4, 6), Color.Red, Color.Plum, new
RectangleF
(-1, -2, 5, 8) };
15
yield return new object[] { new Point(-4, -6), new Point(1, 2), Color.Black, Color.Wheat, new
RectangleF
(-4, -6, 5, 8) };
16
yield return new object[] { new Point(4, 6), new Point(-1, -2), Color.Black, Color.Wheat, new
RectangleF
(-1, -2, 5, 8) };
17
yield return new object[] { new Point(4, 6), new Point(1, 2), Color.Black, Color.Wheat, new
RectangleF
(1, 2, 3, 4) };
205
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new
RectangleF
(1, 2, 0, 4), Color.Empty, Color.Empty, 0f));
207
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new
RectangleF
(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
209
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new
RectangleF
(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true));
216
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new
RectangleF
(1, 2, 3, 0), Color.Empty, Color.Empty, 0f));
218
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new
RectangleF
(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
220
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new
RectangleF
(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true));
229
Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new
RectangleF
(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode));
System\Drawing\Drawing2D\MatrixTests.cs (2)
148
Assert.Throws<OutOfMemoryException>(() => new Matrix(new
RectangleF
(1, 1, 0, 1), new PointF[3]));
155
Assert.Throws<OutOfMemoryException>(() => new Matrix(new
RectangleF
(1, 1, 1, 0), new PointF[3]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (1)
32
private readonly RectangleF _defaultRectangle =
new
(1, 2, 19, 28);
System\Drawing\Graphics_DrawBezierTests.cs (1)
112
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new
RectangleF
(0, 0, 1, 1), 0, 90));
System\Drawing\Graphics_GetContextTests.Core.cs (4)
71
Assert.Equal(new
RectangleF
(0, 0, 9, 10), clip.GetBounds(graphics));
90
Assert.Equal(new
RectangleF
(1, 2, 9, 10), clip.GetBounds(graphics));
111
Assert.Equal(new
RectangleF
(0, 0, 8, 8), clip.GetBounds(graphics));
129
Assert.Equal(new
RectangleF
(0, 0, 8, 8), clip.GetBounds(graphics));
System\Drawing\Graphics_GetContextTests.cs (4)
73
Assert.Equal(new
RectangleF
(0, 0, 9, 10), region.GetBounds(graphics));
91
Assert.Equal(new
RectangleF
(1, 2, 9, 10), region.GetBounds(graphics));
112
Assert.Equal(new
RectangleF
(0, 0, 8, 8), region.GetBounds(graphics));
134
Assert.Equal(new
RectangleF
(0, 0, 8, 8), region.GetBounds(graphics));
System\Drawing\GraphicsTests.Core.cs (10)
75
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, new
RectangleF
(0f, 0f, 1f, 1f)));
88
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new
RectangleF
(0f, 0f, 1f, 1f)));
102
Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangle(pen, new
RectangleF
(0f, 0f, 1f, 1f)));
119
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new
RectangleF
(0f, 0f, 1f, 1f)));
129
AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, new
RectangleF
(0, 0, 1, 1), 0, 90));
142
AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new
RectangleF
(0, 0, 1, 1), 0, 90));
153
AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new
RectangleF
(0, 0, 0, 1), 0, 90));
164
AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new
RectangleF
(0, 0, 1, 0), 0, 90));
178
Assert.Throws<InvalidOperationException>(() => graphics.FillPie(brush, new
RectangleF
(0, 0, 1, 1), 0, 90));
195
AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new
RectangleF
(0, 0, 1, 1), 0, 90));
System\Drawing\GraphicsTests.cs (20)
1962
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, new
RectangleF
(0, 0, 1, 1), 0, 90));
1976
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new
RectangleF
(0, 0, 1, 1), 0, 90));
1988
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new
RectangleF
(0, 0, 0, 1), 0, 90));
2000
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new
RectangleF
(0, 0, 1, 0), 0, 90));
2015
Assert.Throws<InvalidOperationException>(() => graphics.DrawArc(pen, new
RectangleF
(0, 0, 1, 1), 0, 90));
2034
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new
RectangleF
(0, 0, 1, 1), 0, 90));
2171
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, new
RectangleF
(0, 0, 1, 1)));
2185
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new
RectangleF
(0, 0, 1, 1)));
2200
Assert.Throws<InvalidOperationException>(() => graphics.DrawEllipse(pen, new
RectangleF
(0, 0, 1, 1)));
2219
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new
RectangleF
(0, 0, 1, 1)));
2230
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, new
RectangleF
(0, 0, 1, 1), 0, 90));
2244
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new
RectangleF
(0, 0, 1, 1), 0, 90));
2256
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new
RectangleF
(0, 0, 0, 1), 0, 90));
2268
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new
RectangleF
(0, 0, 1, 0), 0, 90));
2283
Assert.Throws<InvalidOperationException>(() => graphics.DrawPie(pen, new
RectangleF
(0, 0, 1, 1), 0, 90));
2302
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new
RectangleF
(0, 0, 1, 1), 0, 90));
2802
Assert.Equal(new
RectangleF
(-4194304, -4194304, 8388608, 8388608), graphics.ClipBounds);
2835
RectangleF rectF =
new
(10.5f, 10.5f, 50.5f, 50.5f);
2983
graphics.DrawRoundedRectangle(Pens.Red, new
RectangleF
(0, 0, 10, 10), new(2, 2));
3001
graphics.FillRoundedRectangle(Brushes.Green, new
RectangleF
(0, 0, 10, 10), new(2, 2));
System\Drawing\Imaging\MetafileTests.cs (1)
38
private readonly RectangleF _rectangleF =
new
(0, 0, 64, 64);
System\Drawing\RegionTests.cs (162)
47
Assert.Equal(new
RectangleF
(-4194304, -4194304, 8388608, 8388608), region.GetBounds(s_graphic));
61
Assert.Equal(new
RectangleF
(x, y, width, height), region.GetBounds(s_graphic));
72
RectangleF rectangle =
new
(x, y, width, height);
178
Assert.Equal(new
RectangleF
(1, 2, 9, 10), region.GetBounds(s_graphic));
282
new Region(new
RectangleF
(10, 10, 100, 100)),
283
new RectangleF[] {
new
(40, 60, 100, 20) },
284
new RectangleF[] {
new
(110, 60, 30, 20) }
289
new Region(new
RectangleF
(70, 10, 100, 100)),
290
new RectangleF[] {
new
(40, 60, 100, 20) },
291
new RectangleF[] {
new
(40, 60, 30, 20) }
296
new Region(new
RectangleF
(40, 100, 100, 100)),
297
new RectangleF[] {
new
(70, 80, 50, 40) },
298
new RectangleF[] {
new
(70, 80, 50, 20) }
303
new Region(new
RectangleF
(40, 10, 100, 100)),
304
new RectangleF[] {
new
(70, 80, 50, 40) },
305
new RectangleF[] {
new
(70, 110, 50, 10) }
310
new Region(new
RectangleF
(30, 30, 80, 80)),
313
new
(45, 45, 200, 200),
314
new
(160, 260, 10, 10),
315
new
(170, 260, 10, 10),
317
new RectangleF[] {
new
(170, 260, 10, 10) }
330
new RectangleF[] {
new
(1, 2, 3, 4) },
545
yield return new object[] { new Region(new Rectangle(1, 2, 3, 4)), new Region(new
RectangleF
(1, 2, 3, 4)), true };
627
new RectangleF[] {
new
(500, 30, 60, 80) },
635
new RectangleF[] {
new
(500, 30, 60, 80) }
641
new RectangleF[] {
new
(520, 40, 60, 80) },
644
new
(-4194304, -4194304, 8388608, 4194344),
645
new
(-4194304, 40, 4194824, 80),
646
new
(580, 40, 4193724, 80),
647
new
(-4194304, 120, 8388608, 4194184)
662
new RectangleF[] {
new
(40, 60, 100, 20) },
665
new
(10, 10, 100, 50),
666
new
(10, 60, 30, 20),
667
new
(10, 80, 100, 30)
675
new RectangleF[] {
new
(40, 60, 100, 20) },
678
new
(70, 10, 100, 50),
679
new
(140, 60, 30, 20),
680
new
(70, 80, 100, 30)
688
new RectangleF[] {
new
(70, 80, 50, 40) },
691
new
(40, 100, 30, 20),
692
new
(120, 100, 20, 20),
693
new
(40, 120, 100, 80)
701
new RectangleF[] {
new
(70, 80, 50, 40) },
704
new
(40, 10, 100, 70),
705
new
(40, 80, 30, 30),
706
new
(120, 80, 20, 30)
716
new
(45, 45, 200, 200),
717
new
(160, 260, 10, 10),
718
new
(170, 260, 10, 10)
722
new
(30, 30, 80, 15),
723
new
(30, 45, 15, 65)
731
new RectangleF[] {
new
(30, 70, 150, 40) },
732
new RectangleF[] {
new
(50, 110, 100, 90) }
739
new RectangleF[] {
new
(40, 10, 100, 150) },
740
new RectangleF[] {
new
(140, 60, 30, 70) }
747
new RectangleF[] {
new
(100, 10, 100, 150) },
748
new RectangleF[] {
new
(70, 60, 30, 70) }
755
new RectangleF[] {
new
(10, 80, 140, 150) },
756
new RectangleF[] {
new
(20, 20, 100, 60) }
762
new RectangleF[] {
new
(170, 40, 60, 80) },
765
new
(130, 30, 60, 10),
766
new
(130, 40, 40, 70)
791
using Region region = new(new
RectangleF
(20, 20, 20, 20));
792
using Region union = new(new
RectangleF
(20, 80, 20, 10));
794
union.Union(new
RectangleF
(60, 60, 30, 10));
920
Assert.Equal(new
RectangleF
(1, 2, 3, 4), newRegion.GetBounds(s_graphic));
1055
Assert.Equal(new
RectangleF
(-5, -5, 10, 10), rects[0]);
1063
new RectangleF[] {
new
(500, 30, 60, 80) },
1064
new RectangleF[] {
new
(500, 30, 60, 80) }
1069
new RectangleF[] {
new
(500, 30, 60, 80) },
1083
new RectangleF[] {
new
(520, 40, 60, 80) },
1096
new Region(new
RectangleF
(260, 30, 60, 80)),
1097
new RectangleF[] {
new
(290, 40, 60, 90) },
1098
new RectangleF[] {
new
(290, 40, 30, 70) }
1103
new Region(new
RectangleF
(20, 330, 40, 50)),
1106
new
(50, 340, 40, 50),
1107
new
(70, 360, 30, 50),
1108
new
(80, 400, 30, 10)
1211
region.Intersect(new
RectangleF
(5, 5, -10, -10));
1425
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new
RectangleF
(1, 2, 3, 4)));
1429
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new
RectangleF
(1, 2, 3, 4), s_graphic));
1472
Assert.Equal(new
RectangleF
(-4194304, -4194304, 8388608, 8388608), region.GetBounds(s_graphic));
1491
new RectangleF[] {
new
(500, 30, 60, 80) },
1492
new RectangleF[] {
new
(500, 30, 60, 80) }
1499
new RectangleF[] {
new
(500, 30, 60, 80) }
1505
new RectangleF[] {
new
(520, 30, 60, 80) },
1506
new RectangleF[] {
new
(500, 30, 80, 80) }
1512
new RectangleF[] {
new
(520, 40, 60, 80) },
1515
new
(500, 30, 60, 10),
1516
new
(500, 40, 80, 70),
1517
new
(520, 110, 60, 10),
1524
new RectangleF[] {
new
(520, 40, 60, 80) },
1541
new
(20, 80, 20, 10),
1542
new
(60, 60, 30, 10)
1546
new
(20, 20, 20, 20),
1547
new
(60, 60, 30, 10),
1548
new
(20, 80, 20, 10)
1557
new
(50, 190, 40, 50),
1558
new
(70, 210, 30, 50)
1562
new
(20, 180, 40, 10),
1563
new
(20, 190, 70, 20),
1564
new
(20, 210, 80, 20),
1565
new
(50, 230, 50, 10),
1566
new
(70, 240, 30, 20)
1575
new
(50, 340, 40, 50),
1576
new
(70, 360, 30, 50),
1577
new
(80, 400, 30, 10)
1581
new
(20, 330, 40, 10),
1582
new
(20, 340, 70, 20),
1583
new
(20, 360, 80, 20),
1584
new
(50, 380, 50, 10),
1585
new
(70, 390, 30, 10),
1586
new
(70, 400, 40, 10)
1595
new
(100, 100, 60, 60),
1596
new
(200, 200, 80, 80)
1600
new
(10, 20, 50, 50),
1601
new
(100, 100, 60, 60),
1602
new
(200, 200, 80, 80)
1610
new RectangleF[] {
new
(40, 60, 100, 20) },
1613
new
(10, 10, 100, 50),
1614
new
(10, 60, 130, 20),
1615
new
(10, 80, 100, 30)
1623
new RectangleF[] {
new
(40, 60, 100, 20) },
1626
new
(70, 10, 100, 50),
1627
new
(40, 60, 130, 20),
1628
new
(70, 80, 100, 30)
1636
new RectangleF[] {
new
(70, 80, 50, 40) },
1639
new
(70, 80, 50, 20),
1640
new
(40, 100, 100, 100)
1648
new RectangleF[] {
new
(70, 80, 50, 40) },
1651
new
(40, 10, 100, 100),
1652
new
(70, 110, 50, 10)
1662
new
(45, 45, 200, 200),
1663
new
(160, 260, 10, 10),
1664
new
(170, 260, 10, 10)
1668
new
(30, 30, 80, 15),
1669
new
(30, 45, 215, 65),
1670
new
(45, 110, 200, 135),
1671
new
(160, 260, 20, 10)
1807
using Region region = new(new
RectangleF
(1, 2, 3, 4));
1816
using Region region = new(new
RectangleF
(1, 2, 3, 4));
1892
using Region region = new(new
RectangleF
(1, 2, 3, 4));
1915
using Region region = new(new
RectangleF
(1, 2, 3, 4));
1953
using Region region = new(new
RectangleF
(1, 2, 3, 4));
1975
new Region(new
RectangleF
(500, 30, 60, 80)),
1976
new RectangleF[] {
new
(500, 30, 60, 80) },
1982
new Region(new
RectangleF
(500, 30, 60, 80)),
1984
new RectangleF[] {
new
(500, 30, 60, 80) }
1989
new Region(new
RectangleF
(0, 0, 0, 0)),
1990
new RectangleF[] {
new
(500, 30, 60, 80) },
1991
new RectangleF[] {
new
(500, 30, 60, 80) }
1997
new RectangleF[] {
new
(520, 40, 60, 80) },
2000
new
(-4194304, -4194304, 8388608, 4194344),
2001
new
(-4194304, 40, 4194824, 80),
2002
new
(580, 40, 4193724, 80),
2003
new
(-4194304, 120, 8388608, 4194184)
2016
new Region(new
RectangleF
(380, 30, 60, 80)),
2017
new RectangleF[] {
new
(410, 40, 60, 80) },
2020
new
(380, 30, 60, 10),
2021
new
(380, 40, 30, 70),
2022
new
(440, 40, 30, 70),
2023
new
(410, 110, 60, 10)
System.Drawing.Primitives (5)
System\Drawing\RectangleF.cs (5)
76
public static explicit operator RectangleF(Vector4 vector) => new
RectangleF
(vector);
82
new
RectangleF
(left, top, right - left, bottom - top);
280
return new
RectangleF
(x1, y1, x2 - x1, y2 - y1);
302
return new
RectangleF
(x1, y1, x2 - x1, y2 - y1);
323
public 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)
232
value = new
RectangleF
(
System.Private.Windows.Core.Tests (2)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
57
new
RectangleF
(1, 2, 3, 4),
1010
public RectangleF RectangleF =
new
(1, 2, 3, 4);
System.Windows.Forms (1)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
1060
focusRectangle = new
RectangleF
(regionRectangles[0].Location, SizeF.Empty);
System.Windows.Forms.Design (1)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
417
new
RectangleF
(0.0f, 0.0f, ClientSize.Width, ClientSize.Height),
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
184
RectangleF sourceBounds =
new
(0, 0, bitmap.Size.Width, bitmap.Size.Height);
185
RectangleF destinationBounds =
new
(0, 0, desiredSize.Width, desiredSize.Height);
System.Windows.Forms.Tests (11)
System\Resources\ResxDataNodeTests.cs (1)
89
new
RectangleF
(10.0f, 20.0f, 30.0f, 40.0f),
System\Windows\Forms\ControlPaintTests.cs (10)
1902
yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new
RectangleF
(1, 2, 3, 4), null };
1904
yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new
RectangleF
(1, 2, -3, -4), new StringFormat() };
1905
yield return new object[] { s, SystemFonts.MenuFont, Color.Red, new
RectangleF
(1, 2, 3, 4), new StringFormat() };
1906
yield return new object[] { s, SystemFonts.MenuFont, Color.Black, new
RectangleF
(1, 2, 3, 4), new StringFormat() };
1907
yield return new object[] { s, SystemFonts.MenuFont, Color.White, new
RectangleF
(1, 2, 3, 4), new StringFormat() };
1908
yield return new object[] { s, SystemFonts.MenuFont, Color.Transparent, new
RectangleF
(1, 2, 3, 4), new StringFormat() };
1909
yield return new object[] { s, SystemFonts.MenuFont, Color.Empty, new
RectangleF
(1, 2, 3, 4), new StringFormat() };
1933
ControlPaint.DrawStringDisabled(graphics, s, null, Color.Red, new
RectangleF
(1, 2, 3, 4), null);
1936
ControlPaint.DrawStringDisabled(graphics, s, null, Color.Red, new
RectangleF
(1, 2, 3, 4), null);
1943
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new
RectangleF
(1, 2, 3, 4), new StringFormat()));
567 references to RectangleF
BinaryFormatTests (2)
FormatTests\FormattedObject\BinaryFormattedTypes.cs (1)
36
typeof(
RectangleF
),
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
185
default(
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
"/>.
15
public static RectangleFAssertions Should(this
RectangleF
actualValue) => new(actualValue);
24
/// Asserts a <see cref="
RectangleF
"/> value approximates another value as close as possible.
30
RectangleF
expectedValue,
44
/// Asserts that two <see cref="
RectangleF
"/> collections contain the same items in the same order
48
public static AndConstraint<GenericCollectionAssertions<
RectangleF
>> BeApproximatelyEquivalentTo(
49
this GenericCollectionAssertions<
RectangleF
> parent,
50
IEnumerable<
RectangleF
> expectation,
56
(
RectangleF
actual,
RectangleF
expected) =>
FluentAssertions\RectangleFAssertions.cs (2)
5
public class RectangleFAssertions(
RectangleF
value)
7
public
RectangleF
Subject { get; } = value;
System.Data.Common (1)
System\Data\TypeLimiter.cs (1)
178
typeof(
RectangleF
),
System.Drawing (1)
System.Drawing.cs (1)
140
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
RectangleF
))]
System.Drawing.Common (168)
misc\DpiHelper.cs (2)
111
RectangleF
sourceRect = new(0, 0, logicalImage.Size.Width, logicalImage.Size.Height);
112
RectangleF
destRect = new(0, 0, deviceImageSize.Width, deviceImageSize.Height);
Special\Forwards.cs (1)
11
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
RectangleF
))]
System\Drawing\Bitmap.cs (1)
187
public Bitmap Clone(
RectangleF
rect, PixelFormat format)
System\Drawing\Drawing2D\GraphicsPath.cs (27)
373
public void AddArc(
RectangleF
rect, float startAngle, float sweepAngle) =>
610
public void AddRectangle(
RectangleF
rect)
622
public void AddRectangles(params
RectangleF
[] rects) => AddRectangles(rects.OrThrowIfNull().AsSpan());
624
/// <inheritdoc cref="AddRectangles(
RectangleF
[])"/>
630
void AddRectangles(params ReadOnlySpan<
RectangleF
> rects)
632
fixed (
RectangleF
* r = rects)
639
public void AddRectangle(Rectangle rect) => AddRectangle((
RectangleF
)rect);
641
/// <inheritdoc cref="AddRectangles(
RectangleF
[])"/>
644
/// <inheritdoc cref="AddRectangles(
RectangleF
[])"/>
660
/// <inheritdoc cref="AddRoundedRectangle(
RectangleF
, SizeF)"/>
662
AddRoundedRectangle((
RectangleF
)rect, radius);
669
public void AddRoundedRectangle(
RectangleF
rect, SizeF radius)
700
public void AddEllipse(
RectangleF
rect) =>
783
public void AddString(string s, FontFamily family, int style, float emSize,
RectangleF
layoutRect, StringFormat? format)
806
=> AddString(s, family, style, emSize, (
RectangleF
)layoutRect, format);
816
public
RectangleF
GetBounds() => GetBounds(null);
818
public
RectangleF
GetBounds(Matrix? matrix) => GetBounds(matrix, null);
820
public
RectangleF
GetBounds(Matrix? matrix, Pen? pen)
864
/// <inheritdoc cref="Warp(ReadOnlySpan{PointF},
RectangleF
, Matrix?, WarpMode, float)"/>
865
public void Warp(PointF[] destPoints,
RectangleF
srcRect) => Warp(destPoints, srcRect, null);
867
/// <inheritdoc cref="Warp(ReadOnlySpan{PointF},
RectangleF
, Matrix?, WarpMode, float)"/>
868
public void Warp(PointF[] destPoints,
RectangleF
srcRect, Matrix? matrix) =>
871
/// <inheritdoc cref="Warp(ReadOnlySpan{PointF},
RectangleF
, Matrix?, WarpMode, float)"/>
872
public void Warp(PointF[] destPoints,
RectangleF
srcRect, Matrix? matrix, WarpMode warpMode) =>
875
/// <inheritdoc cref="Warp(ReadOnlySpan{PointF},
RectangleF
, Matrix?, WarpMode, float)"/>
876
public void Warp(PointF[] destPoints,
RectangleF
srcRect, Matrix? matrix, WarpMode warpMode, float flatness) =>
904
RectangleF
srcRect,
System\Drawing\Drawing2D\LinearGradientBrush.cs (7)
29
public LinearGradientBrush(
RectangleF
rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
50
: this((
RectangleF
)rect, color1, color2, linearGradientMode)
54
public LinearGradientBrush(
RectangleF
rect, Color color1, Color color2, float angle)
59
public LinearGradientBrush(
RectangleF
rect, Color color1, Color color2, float angle, bool isAngleScaleable)
83
: this((
RectangleF
)rect, color1, color2, angle, isAngleScaleable)
124
public
RectangleF
Rectangle
128
RectangleF
rect;
System\Drawing\Drawing2D\Matrix.cs (1)
51
public Matrix(
RectangleF
rect, params PointF[] plgpts)
System\Drawing\Drawing2D\PathGradientBrush.cs (2)
187
public
RectangleF
Rectangle
191
RectangleF
rect;
System\Drawing\Graphics.cs (81)
210
public
RectangleF
ClipBounds
528
public void SetClip(Rectangle rect, Drawing2D.CombineMode combineMode) => SetClip((
RectangleF
)rect, combineMode);
530
public void SetClip(
RectangleF
rect) => SetClip(rect, Drawing2D.CombineMode.Replace);
532
public void SetClip(
RectangleF
rect, Drawing2D.CombineMode combineMode) =>
551
public void IntersectClip(Rectangle rect) => IntersectClip((
RectangleF
)rect);
553
public void IntersectClip(
RectangleF
rect) =>
609
public bool IsVisible(
RectangleF
rect) => IsVisible(rect.X, rect.Y, rect.Width, rect.Height);
666
public void DrawArc(Pen pen,
RectangleF
rect, float startAngle, float sweepAngle) =>
713
public void DrawRectangle(Pen pen,
RectangleF
rect) => DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height);
721
/// <inheritdoc cref="DrawRoundedRectangle(Pen,
RectangleF
, SizeF)"/>
723
DrawRoundedRectangle(pen, (
RectangleF
)rect, radius);
731
public void DrawRoundedRectangle(Pen pen,
RectangleF
rect, SizeF radius)
756
public void DrawRectangles(Pen pen, params
RectangleF
[] rects) => DrawRectangles(pen, rects.OrThrowIfNull().AsSpan());
764
void DrawRectangles(Pen pen, params ReadOnlySpan<
RectangleF
> rects)
768
fixed (
RectangleF
* r = rects)
804
public void DrawEllipse(Pen pen,
RectangleF
rect) => DrawEllipse(pen, rect.X, rect.Y, rect.Width, rect.Height);
829
public void DrawPie(Pen pen,
RectangleF
rect, float startAngle, float sweepAngle) =>
1195
/// <inheritdoc cref="FillRoundedRectangle(Brush,
RectangleF
, SizeF)"/>
1197
FillRoundedRectangle(brush, (
RectangleF
)rect, radius);
1205
public void FillRoundedRectangle(Brush brush,
RectangleF
rect, SizeF radius)
1216
public void FillRectangle(Brush brush,
RectangleF
rect) => FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height);
1248
public void FillRectangles(Brush brush, params
RectangleF
[] rects)
1254
/// <inheritdoc cref="FillRectangles(Brush,
RectangleF
[])"/>
1260
void FillRectangles(Brush brush, params ReadOnlySpan<
RectangleF
> rects)
1264
fixed (
RectangleF
* r = rects)
1272
/// <inheritdoc cref="FillRectangles(Brush,
RectangleF
[])"/>
1276
/// <inheritdoc cref="FillRectangles(Brush,
RectangleF
[])"/>
1370
public void FillEllipse(Brush brush,
RectangleF
rect) => FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height);
1418
public void FillPie(Brush brush,
RectangleF
rect, float startAngle, float sweepAngle) =>
1672
/// <param name="layoutRectangle"><see cref="
RectangleF
"/>structure that specifies the location of the drawn text.</param>
1681
/// <see cref="DrawString(string?, Font, Brush,
RectangleF
, StringFormat?)"/> overload that takes
1685
public void DrawString(string? s, Font font, Brush brush,
RectangleF
layoutRectangle) =>
1694
/// <see cref="DrawString(ReadOnlySpan{char}, Font, Brush,
RectangleF
, StringFormat?)"/> overload that takes
1698
/// <inheritdoc cref="DrawString(string?, Font, Brush,
RectangleF
)"/>
1699
public void DrawString(ReadOnlySpan<char> s, Font font, Brush brush,
RectangleF
layoutRectangle) =>
1710
/// <param name="layoutRectangle"><see cref="
RectangleF
"/>structure that specifies the location of the drawn text.</param>
1725
public void DrawString(string? s, Font font, Brush brush,
RectangleF
layoutRectangle, StringFormat? format) =>
1729
/// <inheritdoc cref="DrawString(string?, Font, Brush,
RectangleF
, StringFormat?)"/>
1730
public void DrawString(ReadOnlySpan<char> s, Font font, Brush brush,
RectangleF
layoutRectangle, StringFormat? format) =>
1734
private void DrawStringInternal(ReadOnlySpan<char> s, Font font, Brush brush,
RectangleF
layoutRectangle, StringFormat? format)
1788
RectangleF
layoutArea,
1878
/// use the <see cref="MeasureCharacterRanges(string?, Font,
RectangleF
, StringFormat?)"/> method or one of
1921
/// <param name="layoutRect"><see cref="
RectangleF
"/> structure that specifies the layout rectangle for the text.</param>
1936
public Region[] MeasureCharacterRanges(string? text, Font font,
RectangleF
layoutRect, StringFormat? stringFormat) =>
1940
/// <inheritdoc cref="MeasureCharacterRanges(string?, Font,
RectangleF
, StringFormat?)"/>
1941
public Region[] MeasureCharacterRanges(ReadOnlySpan<char> text, Font font,
RectangleF
layoutRect, StringFormat? stringFormat) =>
2006
public void DrawImage(Image image,
RectangleF
rect) => DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height);
2089
public void DrawImage(Image image, float x, float y,
RectangleF
srcRect, GraphicsUnit srcUnit)
2105
=> DrawImage(image, x, y, (
RectangleF
)srcRect, srcUnit);
2107
public void DrawImage(Image image,
RectangleF
destRect,
RectangleF
srcRect, GraphicsUnit srcUnit)
2128
public void DrawImage(Image image, PointF[] destPoints,
RectangleF
srcRect, GraphicsUnit srcUnit)
2154
public void DrawImage(Image image, PointF[] destPoints,
RectangleF
srcRect, GraphicsUnit srcUnit, ImageAttributes? imageAttr) =>
2160
RectangleF
srcRect,
2169
RectangleF
srcRect,
2461
public void EnumerateMetafile(Metafile metafile,
RectangleF
destRect, EnumerateMetafileProc callback) =>
2464
public void EnumerateMetafile(Metafile metafile,
RectangleF
destRect, EnumerateMetafileProc callback, IntPtr callbackData) =>
2491
RectangleF
srcRect,
2498
RectangleF
srcRect,
2520
RectangleF
destRect,
2521
RectangleF
srcRect,
2527
RectangleF
destRect,
2528
RectangleF
srcRect,
2551
RectangleF
srcRect,
2558
RectangleF
srcRect,
2970
RectangleF
destRect,
2994
ImageAttributes? imageAttr) => EnumerateMetafile(metafile, (
RectangleF
)destRect, callback, callbackData, imageAttr);
3057
RectangleF
srcRect,
3089
(
RectangleF
)srcRect,
3097
RectangleF
destRect,
3098
RectangleF
srcRect,
3127
ImageAttributes? imageAttr) => EnumerateMetafile(metafile, (
RectangleF
)destRect, srcRect, unit, callback, callbackData, imageAttr);
3132
RectangleF
srcRect,
3382
public
RectangleF
VisibleClipBounds
3464
public GraphicsContainer BeginContainer(
RectangleF
dstrect,
RectangleF
srcrect, GraphicsUnit unit)
3511
=> BeginContainer((
RectangleF
)dstrect, (
RectangleF
)srcrect, unit);
3613
/// <inheritdoc cref="DrawImage(Image, Effect,
RectangleF
, Matrix?, GraphicsUnit, ImageAttributes?)"/>
3623
/// <param name="srcRect">The portion of the image to be drawn. <see cref="
RectangleF
.Empty"/> draws the full image.</param>
3630
RectangleF
srcRect = default,
System\Drawing\Image.cs (2)
582
public
RectangleF
GetBounds(ref GraphicsUnit pageUnit)
585
RectangleF
bounds = this.GetImageBounds();
System\Drawing\Imaging\Metafile.cs (16)
92
public Metafile(IntPtr referenceHdc,
RectangleF
frameRect) :
101
public Metafile(IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit) :
110
public Metafile(IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit, EmfType type) :
119
public Metafile(IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description)
175
public Metafile(string fileName, IntPtr referenceHdc,
RectangleF
frameRect) :
183
public Metafile(string fileName, IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit) :
191
public Metafile(string fileName, IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit, EmfType type) :
199
public Metafile(string fileName, IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit, string? desc) :
207
public Metafile(string fileName, IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description)
285
public Metafile(Stream stream, IntPtr referenceHdc,
RectangleF
frameRect) :
293
public Metafile(Stream stream, IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit) :
301
public Metafile(Stream stream, IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit, EmfType type) :
380
RectF rect = (
RectangleF
)frameRect;
429
RectF rect = (
RectangleF
)frameRect;
474
public unsafe Metafile(Stream stream, IntPtr referenceHdc,
RectangleF
frameRect, MetafileFrameUnit frameUnit, EmfType type, string? description)
507
RectF rect = (
RectangleF
)frameRect;
System\Drawing\Printing\PageSettings.cs (2)
148
public
RectangleF
PrintableArea
152
RectangleF
printableArea = default;
System\Drawing\Printing\PrintPreviewGraphics.cs (1)
25
public
RectangleF
VisibleClipBounds
System\Drawing\Region.cs (20)
21
public Region(
RectangleF
rect)
29
public Region(Rectangle rect) : this((
RectangleF
)rect)
109
public void Intersect(
RectangleF
rect) =>
112
public void Intersect(Rectangle rect) => Intersect((
RectangleF
)rect);
128
public void Union(
RectangleF
rect) =>
131
public void Union(Rectangle rect) => Union((
RectangleF
)rect);
147
public void Xor(
RectangleF
rect) =>
150
public void Xor(Rectangle rect) => Xor((
RectangleF
)rect);
166
public void Exclude(
RectangleF
rect) =>
169
public void Exclude(Rectangle rect) => Exclude((
RectangleF
)rect);
185
public void Complement(
RectangleF
rect) =>
188
public void Complement(Rectangle rect) => Complement((
RectangleF
)rect);
216
public
RectangleF
GetBounds(Graphics g)
301
public bool IsVisible(
RectangleF
rect) => IsVisible(rect, null);
305
public bool IsVisible(
RectangleF
rect, Graphics? g)
330
public bool IsVisible(Rectangle rect, Graphics? g) => IsVisible((
RectangleF
)rect, g);
332
public
RectangleF
[] GetRegionScans(Matrix matrix)
347
RectangleF
[] rectangles = new
RectangleF
[count];
349
fixed (
RectangleF
* r = rectangles)
System\Drawing\TextureBrush.cs (5)
36
public TextureBrush(Image image, Drawing2D.WrapMode wrapMode,
RectangleF
dstRect)
56
: this(image, wrapMode, (
RectangleF
)dstRect)
60
public TextureBrush(Image image,
RectangleF
dstRect) : this(image, dstRect, null) { }
62
public TextureBrush(Image image,
RectangleF
dstRect, ImageAttributes? imageAttr)
84
: this(image, (
RectangleF
)dstRect, imageAttr)
System.Drawing.Common.Tests (277)
mono\System.Drawing.Imaging\BmpCodecTests.cs (5)
46
RectangleF
rect = bmp.GetBounds(ref unit);
112
RectangleF
rect = bmp.GetBounds(ref unit);
178
RectangleF
rect = bmp.GetBounds(ref unit);
365
RectangleF
rect = bmp.GetBounds(ref unit);
496
RectangleF
rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\GifCodecTests.cs (1)
43
RectangleF
rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\IconCodecTests.cs (6)
70
RectangleF
rect = bmp.GetBounds(ref unit);
219
RectangleF
rect = bmp.GetBounds(ref unit);
424
RectangleF
rect = bmp.GetBounds(ref unit);
646
RectangleF
rect = bmp.GetBounds(ref unit);
904
RectangleF
rect = bmp.GetBounds(ref unit);
1837
RectangleF
rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\JpegCodecTests.cs (2)
45
RectangleF
rect = bmp.GetBounds(ref unit);
172
RectangleF
rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\PngCodecTests.cs (3)
45
RectangleF
rect = bmp.GetBounds(ref unit);
247
RectangleF
rect = bmp.GetBounds(ref unit);
355
RectangleF
rect = bmp.GetBounds(ref unit);
mono\System.Drawing.Imaging\TiffCodecTests.cs (1)
45
RectangleF
rect = bmp.GetBounds(ref unit);
mono\System.Drawing\GraphicsTests.cs (41)
41
private
RectangleF
[] _rects;
149
RectangleF
[] rects;
238
RectangleF
[] rects;
367
private static void Compare(string msg,
RectangleF
b1,
RectangleF
b2)
380
RectangleF
bounds = g.Clip.GetBounds(g);
394
RectangleF
bounds = g.Clip.GetBounds(g);
440
private static void CheckBounds(string msg,
RectangleF
bounds, float x, float y, float w, float h)
479
RectangleF
clip = new Rectangle(0, 0, 8, 8);
854
RectangleF
[] rectf = [
892
RectangleF
[] rectf = [
1167
Assert.Throws<ArgumentNullException>(() => g.FillRectangles(null, new
RectangleF
[1]));
1175
Assert.Throws<ArgumentNullException>(() => g.FillRectangles(Brushes.Red, (
RectangleF
[])null));
1183
Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<
RectangleF
>()));
1901
RectangleF
layout_rect = new(0.0f, 0.0f, size.Width, size.Height);
1926
RectangleF
layout_rect = new(0.0f, 0.0f, size.Width, size.Height);
1967
RectangleF
layout_rect = new(0.0f, 0.0f, size.Width, size.Height);
1972
RectangleF
bounds_none = regions[0].GetBounds(g);
1977
RectangleF
bounds_show = regions[0].GetBounds(g);
1987
RectangleF
bounds_hide = regions[0].GetBounds(g);
2006
private static Region[] Measure_Helper(Graphics gfx,
RectangleF
rect, bool useSpan)
2030
RectangleF
zb = zero[i].GetBounds(gfx);
2031
RectangleF
sb = small[i].GetBounds(gfx);
2042
RectangleF
zb = zero[i].GetBounds(gfx);
2043
RectangleF
mb = max[i].GetBounds(gfx);
2061
RectangleF
mb = min[i].GetBounds(gfx);
2072
RectangleF
mb = neg[i].GetBounds(gfx);
2202
RectangleF
noclip = g.VisibleClipBounds;
2210
RectangleF
clip = g.VisibleClipBounds;
2217
RectangleF
rotclip = g.VisibleClipBounds;
2235
RectangleF
noclip = g.VisibleClipBounds;
2243
RectangleF
clipbound = g.ClipBounds;
2249
RectangleF
clip = g.VisibleClipBounds;
2256
RectangleF
rotclipbound = g.ClipBounds;
2262
RectangleF
rotclip = g.VisibleClipBounds;
2280
RectangleF
vcb = g.VisibleClipBounds;
2287
RectangleF
rvcb = g.VisibleClipBounds;
2299
RectangleF
vcb = g.VisibleClipBounds;
2306
RectangleF
svcb = g.VisibleClipBounds;
2318
RectangleF
vcb = g.VisibleClipBounds;
2325
RectangleF
tvcb = g.VisibleClipBounds;
mono\System.Imaging\MetafileTest.cs (2)
238
Metafile mf = new(hdc, default(
RectangleF
));
317
RectangleF
rect = new(0, 0, size.Width, size.Height);
System\Drawing\BitmapTests.cs (1)
407
using Bitmap clone = bitmap.Clone((
RectangleF
)rectangle, format);
System\Drawing\Drawing2D\GraphicsPathTests.cs (6)
759
RectangleF
[] rectFloat = [new(1, 1, 2, 2), new(3, 3, 4, 4)];
783
RectangleF
[] rectFloat = [
806
AssertExtensions.Throws<ArgumentNullException>("rects", () => gp.AddRectangles((
RectangleF
[])null));
1127
RectangleF
rectangle = new(1f, 1f, 2f, 2f);
1615
gp.AddRectangles(new
RectangleF
[2]
1723
Rectangle rectangle, float penWidth,
RectangleF
expectedBounds)
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (5)
22
public void Ctor_PointF_PointF_Color_Color(Point point1, Point point2, Color color1, Color color2,
RectangleF
expectedRectangle)
49
public void Ctor_Point_Point_Color_Color(Point point1, Point point2, Color color1, Color color2,
RectangleF
expectedRectangle)
102
using LinearGradientBrush brush = new((
RectangleF
)rectangle, color1, color2, linearGradientMode);
145
using LinearGradientBrush brush = new((
RectangleF
)rectangle, color1, color2, angle);
188
using LinearGradientBrush brush = new((
RectangleF
)rectangle, color1, color2, angle, isAngleScalable);
System\Drawing\Drawing2D\MatrixTests.cs (1)
130
AssertExtensions.Throws<ArgumentNullException>("plgpts", () => new Matrix(default(
RectangleF
), null));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (1)
32
private readonly
RectangleF
_defaultRectangle = new(1, 2, 19, 28);
System\Drawing\GraphicsTests.cs (8)
2099
AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangles(null, new
RectangleF
[2]));
2111
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new
RectangleF
[2]));
2121
AssertExtensions.Throws<ArgumentNullException>("rects", () => graphics.DrawRectangles(pen, (
RectangleF
[])null));
2131
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<
RectangleF
>()));
2144
Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangles(pen, new
RectangleF
[2]));
2161
AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new
RectangleF
[2]));
2799
private static void VerifyGraphics(Graphics graphics,
RectangleF
expectedVisibleClipBounds)
2835
RectangleF
rectF = new(10.5f, 10.5f, 50.5f, 50.5f);
System\Drawing\Imaging\MetafileTests.cs (2)
38
private readonly
RectangleF
_rectangleF = new(0, 0, 64, 64);
519
fileName, g.GetHdc(), default(
RectangleF
), MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, description))
System\Drawing\RegionTests.cs (179)
72
RectangleF
rectangle = new(x, y, width, height);
283
new
RectangleF
[] { new(40, 60, 100, 20) },
284
new
RectangleF
[] { new(110, 60, 30, 20) }
290
new
RectangleF
[] { new(40, 60, 100, 20) },
291
new
RectangleF
[] { new(40, 60, 30, 20) }
297
new
RectangleF
[] { new(70, 80, 50, 40) },
298
new
RectangleF
[] { new(70, 80, 50, 20) }
304
new
RectangleF
[] { new(70, 80, 50, 40) },
305
new
RectangleF
[] { new(70, 110, 50, 10) }
311
new
RectangleF
[]
317
new
RectangleF
[] { new(170, 260, 10, 10) }
323
new
RectangleF
[] {
RectangleF
.Empty },
324
Array.Empty<
RectangleF
>()
330
new
RectangleF
[] { new(1, 2, 3, 4) },
331
Array.Empty<
RectangleF
>()
337
public void Complement_Region_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
341
foreach (
RectangleF
rect in rectangles)
424
public void Complement_Rectangle_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
428
foreach (
RectangleF
rect in rectangles)
440
public void Complement_RectangleF_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
444
foreach (
RectangleF
rect in rectangles)
456
public void Complement_GraphicsPath_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
460
foreach (
RectangleF
rect in rectangles)
521
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(
RectangleF
)));
627
new
RectangleF
[] { new(500, 30, 60, 80) },
628
Array.Empty<
RectangleF
>()
634
new
RectangleF
[] {
RectangleF
.Empty },
635
new
RectangleF
[] { new(500, 30, 60, 80) }
641
new
RectangleF
[] { new(520, 40, 60, 80) },
642
new
RectangleF
[]
654
new
RectangleF
[] {
RectangleF
.Empty },
655
new
RectangleF
[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) }
662
new
RectangleF
[] { new(40, 60, 100, 20) },
663
new
RectangleF
[]
675
new
RectangleF
[] { new(40, 60, 100, 20) },
676
new
RectangleF
[]
688
new
RectangleF
[] { new(70, 80, 50, 40) },
689
new
RectangleF
[]
701
new
RectangleF
[] { new(70, 80, 50, 40) },
702
new
RectangleF
[]
714
new
RectangleF
[]
720
new
RectangleF
[]
731
new
RectangleF
[] { new(30, 70, 150, 40) },
732
new
RectangleF
[] { new(50, 110, 100, 90) }
739
new
RectangleF
[] { new(40, 10, 100, 150) },
740
new
RectangleF
[] { new(140, 60, 30, 70) }
747
new
RectangleF
[] { new(100, 10, 100, 150) },
748
new
RectangleF
[] { new(70, 60, 30, 70) }
755
new
RectangleF
[] { new(10, 80, 140, 150) },
756
new
RectangleF
[] { new(20, 20, 100, 60) }
762
new
RectangleF
[] { new(170, 40, 60, 80) },
763
new
RectangleF
[]
773
public void Exclude_Region_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
777
foreach (
RectangleF
rect in rectangles)
831
public void Exclude_Rectangle_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
835
foreach (
RectangleF
rect in rectangles)
847
public void Exclude_RectangleF_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
851
foreach (
RectangleF
rect in rectangles)
863
public void Exclude_GraphicsPath_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
867
foreach (
RectangleF
rect in rectangles)
904
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(
RectangleF
)));
1053
RectangleF
[] rects = clipRegion.GetRegionScans(matrix);
1063
new
RectangleF
[] { new(500, 30, 60, 80) },
1064
new
RectangleF
[] { new(500, 30, 60, 80) }
1069
new
RectangleF
[] { new(500, 30, 60, 80) },
1070
Array.Empty<
RectangleF
>()
1076
new
RectangleF
[] {
RectangleF
.Empty },
1077
Array.Empty<
RectangleF
>()
1083
new
RectangleF
[] { new(520, 40, 60, 80) },
1084
new
RectangleF
[] { new Rectangle(520, 40, 60, 80) }
1090
new
RectangleF
[] {
RectangleF
.Empty },
1091
Array.Empty<
RectangleF
>()
1097
new
RectangleF
[] { new(290, 40, 60, 90) },
1098
new
RectangleF
[] { new(290, 40, 30, 70) }
1104
new
RectangleF
[]
1110
Array.Empty<
RectangleF
>()
1116
public void Intersect_Region_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1120
foreach (
RectangleF
rect in rectangles)
1164
public void Intersect_Rectangle_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1168
foreach (
RectangleF
rect in rectangles)
1192
public void Intersect_RectangleF_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1196
foreach (
RectangleF
rect in rectangles)
1220
public void Intersect_GraphicsPath_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1224
foreach (
RectangleF
rect in rectangles)
1261
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(
RectangleF
)));
1334
Assert.Equal(expected, region.IsVisible((
RectangleF
)rectangle));
1338
Assert.Equal(expected, region.IsVisible((
RectangleF
)rectangle, s_graphic));
1339
Assert.Equal(expected, region.IsVisible((
RectangleF
)rectangle, disposedGraphics));
1340
Assert.Equal(expected, region.IsVisible((
RectangleF
)rectangle, null));
1445
Assert.Equal(
RectangleF
.Empty, region.GetBounds(s_graphic));
1491
new
RectangleF
[] { new(500, 30, 60, 80) },
1492
new
RectangleF
[] { new(500, 30, 60, 80) }
1498
new
RectangleF
[] {
RectangleF
.Empty },
1499
new
RectangleF
[] { new(500, 30, 60, 80) }
1505
new
RectangleF
[] { new(520, 30, 60, 80) },
1506
new
RectangleF
[] { new(500, 30, 80, 80) }
1512
new
RectangleF
[] { new(520, 40, 60, 80) },
1513
new
RectangleF
[]
1524
new
RectangleF
[] { new(520, 40, 60, 80) },
1525
new
RectangleF
[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) }
1531
new
RectangleF
[] {
RectangleF
.Empty },
1532
new
RectangleF
[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) }
1539
new
RectangleF
[]
1544
new
RectangleF
[]
1555
new
RectangleF
[]
1560
new
RectangleF
[]
1573
new
RectangleF
[]
1579
new
RectangleF
[]
1593
new
RectangleF
[]
1598
new
RectangleF
[]
1610
new
RectangleF
[] { new(40, 60, 100, 20) },
1611
new
RectangleF
[]
1623
new
RectangleF
[] { new(40, 60, 100, 20) },
1624
new
RectangleF
[]
1636
new
RectangleF
[] { new(70, 80, 50, 40) },
1637
new
RectangleF
[]
1648
new
RectangleF
[] { new(70, 80, 50, 40) },
1649
new
RectangleF
[]
1660
new
RectangleF
[]
1666
new
RectangleF
[]
1678
public void Union_Region_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1682
foreach (
RectangleF
rect in rectangles)
1727
public void Union_Rectangle_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1731
foreach (
RectangleF
rect in rectangles)
1743
public void Union_RectangleF_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1747
foreach (
RectangleF
rect in rectangles)
1759
public void Union_GraphicsPath_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
1763
foreach (
RectangleF
rect in rectangles)
1800
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(
RectangleF
)));
1976
new
RectangleF
[] { new(500, 30, 60, 80) },
1977
Array.Empty<
RectangleF
>()
1983
new
RectangleF
[] {
RectangleF
.Empty },
1984
new
RectangleF
[] { new(500, 30, 60, 80) }
1990
new
RectangleF
[] { new(500, 30, 60, 80) },
1991
new
RectangleF
[] { new(500, 30, 60, 80) }
1997
new
RectangleF
[] { new(520, 40, 60, 80) },
1998
new
RectangleF
[]
2010
new
RectangleF
[] {
RectangleF
.Empty },
2011
new
RectangleF
[] { new Rectangle(-4194304, -4194304, 8388608, 8388608) }
2017
new
RectangleF
[] { new(410, 40, 60, 80) },
2018
new
RectangleF
[]
2030
public void Xor_Region_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
2034
foreach (
RectangleF
rect in rectangles)
2085
public void Xor_Rectangle_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
2089
foreach (
RectangleF
rect in rectangles)
2101
public void Xor_RectangleF_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
2105
foreach (
RectangleF
rect in rectangles)
2117
public void Xor_GraphicsPath_Success(Region region,
RectangleF
[] rectangles,
RectangleF
[] expectedScans)
2121
foreach (
RectangleF
rect in rectangles)
2158
AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(
RectangleF
)));
System\Drawing\TextureBrushTests.cs (13)
112
using TextureBrush brush = new(image, (
RectangleF
)rectangle);
166
using TextureBrush brush = new(image, wrapMode, (
RectangleF
)rectangle);
222
using TextureBrush brush = new(image, (
RectangleF
)rectangle, attributes);
243
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
RectangleF
.Empty));
245
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null,
RectangleF
.Empty, null));
247
AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile,
RectangleF
.Empty));
259
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
RectangleF
.Empty));
261
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image,
RectangleF
.Empty, null));
263
AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile,
RectangleF
.Empty));
274
Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode,
RectangleF
.Empty));
292
Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, (
RectangleF
)rectangle));
294
Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, WrapMode.Tile, (
RectangleF
)rectangle));
296
Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, (
RectangleF
)rectangle, null));
System.Drawing.Primitives (59)
System\Drawing\Rectangle.cs (3)
177
public static Rectangle Ceiling(
RectangleF
value)
192
public static Rectangle Truncate(
RectangleF
value)
207
public static Rectangle Round(
RectangleF
value)
System\Drawing\RectangleF.cs (56)
15
public struct RectangleF : IEquatable<
RectangleF
>
18
/// Initializes a new instance of the <see cref='System.Drawing.
RectangleF
'/> class.
20
public 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"/>.
71
public static explicit operator Vector4(
RectangleF
rectangle) => rectangle.ToVector4();
74
/// Converts the specified <see cref="System.Numerics.Vector2"/> to a <see cref="System.Drawing.
RectangleF
"/>.
76
public static explicit operator
RectangleF
(Vector4 vector) => new RectangleF(vector);
79
/// Creates a new <see cref='System.Drawing.
RectangleF
'/> with the specified location and size.
81
public 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
'/>.
189
public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is
RectangleF
&& Equals((
RectangleF
)obj);
191
public readonly bool Equals(
RectangleF
other) => this == other;
194
/// Tests whether two <see cref='System.Drawing.
RectangleF
'/> objects have equal location and size.
196
public static bool operator ==(
RectangleF
left,
RectangleF
right) =>
200
/// Tests whether two <see cref='System.Drawing.
RectangleF
'/> objects differ in location or size.
202
public static bool operator !=(
RectangleF
left,
RectangleF
right) => !(left == right);
220
public readonly bool Contains(
RectangleF
rect) =>
224
/// Gets the hash code for this <see cref='System.Drawing.
RectangleF
'/>.
247
public static
RectangleF
Inflate(
RectangleF
rect, float x, float y)
249
RectangleF
r = rect;
257
public void Intersect(
RectangleF
rect)
259
RectangleF
result = Intersect(rect, this);
271
public static
RectangleF
Intersect(
RectangleF
a,
RectangleF
b)
289
public readonly bool IntersectsWith(
RectangleF
rect) =>
295
public static
RectangleF
Union(
RectangleF
a,
RectangleF
b)
321
/// <see cref='System.Drawing.
RectangleF
'/>.
323
public 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.
214
public static void WriteRectangleF(Stream stream,
RectangleF
value)
219
new ClassInfo(1, typeof(
RectangleF
).FullName!, s_rectangleMemberNames),
705
case
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)
1010
public
RectangleF
RectangleF = new(1, 2, 3, 4);
System.Private.Windows.Core.TestUtilities (12)
FluentAssertions\FluentAssertExtensions.cs (10)
16
/// current <see cref="
RectangleF
"/>.
18
public static RectangleFAssertions Should(this
RectangleF
actualValue) => new(actualValue);
27
/// Asserts a <see cref="
RectangleF
"/> value approximates another value as close as possible.
33
RectangleF
expectedValue,
47
/// Asserts that two <see cref="
RectangleF
"/> collections contain the same items in the same order
51
public static AndConstraint<GenericCollectionAssertions<
RectangleF
>> BeApproximatelyEquivalentTo(
52
this GenericCollectionAssertions<
RectangleF
> parent,
53
IEnumerable<
RectangleF
> expectation,
59
(
RectangleF
actual,
RectangleF
expected) =>
FluentAssertions\RectangleFAssertions.cs (2)
8
public class RectangleFAssertions(
RectangleF
value)
10
public
RectangleF
Subject { get; } = value;
System.Private.Windows.GdiPlus (6)
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (2)
13
internal static
RectangleF
GetImageBounds(this IPointer<GpImage> image)
15
RectangleF
bounds;
Windows\Win32\Graphics\GdiPlus\RectF.cs (4)
11
public static implicit operator
RectangleF
(RectF rect) => Unsafe.As<RectF,
RectangleF
>(ref rect);
12
public static implicit operator RectF(
RectangleF
rectangle) => Unsafe.As<
RectangleF
, RectF>(ref rectangle);
System.Windows.Forms (11)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (7)
1027
RectangleF
focusRectangle =
RectangleF
.Empty;
1061
foreach (
RectangleF
rect in regionRectangles)
1063
focusRectangle =
RectangleF
.Union(focusRectangle, rect);
1230
RectangleF
focusRectangle,
1325
Debug.Assert(focusRectangle !=
RectangleF
.Empty, "focusRectangle should be initialized");
1330
foreach (
RectangleF
rect in regionRectangles)
System\Windows\Forms\Layout\TableLayout.cs (3)
113
RectangleF
displayRect = (
RectangleF
)container.DisplayRectangle;
1173
private static void SetElementBounds(ContainerInfo containerInfo,
RectangleF
displayRectF)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
1945
RectangleF
layoutRectangle,
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
184
RectangleF
sourceBounds = new(0, 0, bitmap.Size.Width, bitmap.Size.Height);
185
RectangleF
destinationBounds = new(0, 0, desiredSize.Width, desiredSize.Height);
System.Windows.Forms.Tests (4)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
234
default(
RectangleF
),
235
new
RectangleF
[] { default },
System\Windows\Forms\ControlPaintTests.cs (2)
1903
yield return new object[] { s, SystemFonts.MenuFont, Color.Red,
RectangleF
.Empty, new StringFormat() };
1917
RectangleF
layoutRectangle, StringFormat format)