132 instantiations of SizeF
BinaryFormatTests (4)
DesignSurface (1)
NativeHost.ManagedControl (1)
PresentationUI (11)
System.ComponentModel.TypeConverter (2)
System.Drawing.Common (8)
System\Drawing\Graphics.cs (7)
1823return new SizeF(boundingBox.Width, boundingBox.Height);
1885public SizeF MeasureString(string? text, Font font) => MeasureString(text, font, new SizeF(0, 0));
1889public SizeF MeasureString(ReadOnlySpan<char> text, Font font) => MeasureString(text, font, new SizeF(0, 0));
1894public SizeF MeasureString(string? text, Font font, int width) => MeasureString(text, font, new SizeF(width, 999999));
1899MeasureString(text, font, new SizeF(width, 999999));
1907MeasureString(text, font, new SizeF(width, 999999), format);
1912MeasureString(text, font, new SizeF(width, 999999), format);
System.Drawing.Common.Tests (9)
mono\System.Drawing\GraphicsTests.cs (2)
1785? g.MeasureString(s.AsSpan(), _font, new SizeF(80, size.Height), null, out int chars, out int lines)
1786: g.MeasureString(s, _font, new SizeF(80, size.Height), null, out chars, out lines);
System\Drawing\GraphicsTests.cs (2)
2983graphics.DrawRoundedRectangle(Pens.Red, new RectangleF(0, 0, 10, 10), new(2, 2));
3001graphics.FillRoundedRectangle(Brushes.Green, new RectangleF(0, 0, 10, 10), new(2, 2));
System.Drawing.Primitives (9)
System.Private.Windows.Core (1)
System.Private.Windows.Core.Tests (2)
System.Windows.Forms (14)
System.Windows.Forms.Design (4)
System.Windows.Forms.Tests (13)
TestPassApp (13)
TrimTest (1)
TrimTestBinaryDeserialization (1)
WindowsFormsIntegration (1)
WinFormsControlsTest (37)
327 references to SizeF
BinaryFormatTests (1)
Microsoft.VisualBasic.Forms (1)
netstandard (1)
System.ComponentModel.TypeConverter (3)
System.Data.Common (1)
System.Drawing (1)
System.Drawing.Common (38)
System\Drawing\Graphics.cs (34)
721/// <inheritdoc cref="DrawRoundedRectangle(Pen, RectangleF, SizeF)"/>
731public void DrawRoundedRectangle(Pen pen, RectangleF rect, SizeF radius)
1195/// <inheritdoc cref="FillRoundedRectangle(Brush, RectangleF, SizeF)"/>
1205public void FillRoundedRectangle(Brush brush, RectangleF rect, SizeF radius)
1763/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/>
1764public SizeF MeasureString(
1767SizeF layoutArea,
1774/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?, out int, out int)"/>
1775public SizeF MeasureString(
1778SizeF layoutArea,
1785public SizeF MeasureStringInternal(
1797return SizeF.Empty;
1827/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/>
1828public SizeF MeasureString(string? text, Font font, PointF origin, StringFormat? stringFormat)
1833public SizeF MeasureString(ReadOnlySpan<char> text, Font font, PointF origin, StringFormat? stringFormat)
1837/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/>
1838public SizeF MeasureString(string? text, Font font, SizeF layoutArea) => MeasureString(text, font, layoutArea, null);
1841/// <inheritdoc cref="MeasureString(string?, Font, SizeF)"/>
1842public SizeF MeasureString(ReadOnlySpan<char> text, Font font, SizeF layoutArea) => MeasureString(text, font, layoutArea, null);
1849/// <see cref="SizeF"/> structure that specifies the maximum layout area for the text.
1852public SizeF MeasureString(string? text, Font font, SizeF layoutArea, StringFormat? stringFormat) =>
1856/// <inheritdoc cref="MeasureString(string?, Font, SizeF, StringFormat?)"/>
1857public SizeF MeasureString(ReadOnlySpan<char> text, Font font, SizeF layoutArea, StringFormat? stringFormat) =>
1867/// This method returns a <see cref="SizeF"/> structure that represents the size, in the units specified by the
1885public SizeF MeasureString(string? text, Font font) => MeasureString(text, font, new SizeF(0, 0));
1889public SizeF MeasureString(ReadOnlySpan<char> text, Font font) => MeasureString(text, font, new SizeF(0, 0));
1894public SizeF MeasureString(string? text, Font font, int width) => MeasureString(text, font, new SizeF(width, 999999));
1898public SizeF MeasureString(ReadOnlySpan<char> text, Font font, int width) =>
1906public SizeF MeasureString(string? text, Font font, int width, StringFormat? format) =>
1911public SizeF MeasureString(ReadOnlySpan<char> text, Font font, int width, StringFormat? format) =>
System.Drawing.Common.Tests (38)
mono\System.Drawing\GraphicsTests.cs (29)
1575SizeF size = g.MeasureString(null, _font);
1605SizeF size = g.MeasureString("a", _font, SizeF.Empty);
1608size = g.MeasureString("a".AsSpan(), _font, SizeF.Empty);
1611size = g.MeasureString(string.Empty, _font, SizeF.Empty);
1614size = g.MeasureString(string.Empty.AsSpan(), _font, SizeF.Empty);
1622SizeF size0 = useSpan ? g.MeasureString(s.AsSpan(), _font, 0) : g.MeasureString(s, _font, 0);
1623SizeF sizeN = useSpan ? g.MeasureString(s.AsSpan(), _font, int.MinValue) : g.MeasureString(s, _font, int.MinValue);
1624SizeF sizeP = useSpan ? g.MeasureString(s.AsSpan(), _font, int.MaxValue) : g.MeasureString(s, _font, int.MaxValue);
1656SizeF near = useSpan
1661SizeF center = useSpan
1666SizeF far = useSpan
1689SizeF near = useSpan
1694SizeF center = useSpan
1699SizeF far = useSpan
1720SizeF near = useSpan
1725SizeF center = useSpan
1730SizeF far = useSpan
1753SizeF near = useSpan
1758SizeF center = useSpan
1763SizeF far = useSpan
1782SizeF size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.MeasureString(s, _font);
1784SizeF size2 = useSpan
1805SizeF size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.MeasureString(s, _font);
1810SizeF expected = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.MeasureString(s, _font);
1900SizeF size = g.MeasureString(text, _font, new Point(0, 0), string_format);
1923SizeF size = useSpan
1966SizeF size = g.MeasureString(text, _font, new Point(0, 0), string_format);
2121SizeF sz = g.MeasureString(text, _font, 80, format);
System.Drawing.Primitives (99)
System\Drawing\SizeF.cs (72)
16public struct SizeF : IEquatable<SizeF>
19/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class.
21public static readonly SizeF Empty;
26/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class from the specified
27/// existing <see cref='System.Drawing.SizeF'/>.
29public SizeF(SizeF size)
36/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class from the specified
46/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> struct from the specified
56/// Creates a new <see cref="System.Numerics.Vector2"/> from this <see cref="System.Drawing.SizeF"/>.
61/// Initializes a new instance of the <see cref='System.Drawing.SizeF'/> class from the specified dimensions.
70/// Converts the specified <see cref="System.Drawing.SizeF"/> to a <see cref="System.Numerics.Vector2"/>.
72public static explicit operator Vector2(SizeF size) => size.ToVector2();
75/// Converts the specified <see cref="System.Numerics.Vector2"/> to a <see cref="System.Drawing.SizeF"/>.
77public static explicit operator SizeF(Vector2 vector) => new SizeF(vector);
80/// Performs vector addition of two <see cref='System.Drawing.SizeF'/> objects.
82public static SizeF operator +(SizeF sz1, SizeF sz2) => Add(sz1, sz2);
85/// Contracts a <see cref='System.Drawing.SizeF'/> by another <see cref='System.Drawing.SizeF'/>
87public static SizeF operator -(SizeF sz1, SizeF sz2) => Subtract(sz1, sz2);
90/// Multiplies <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>.
93/// <param name="right">Multiplicand of type <see cref="SizeF"/>.</param>
94/// <returns>Product of type <see cref="SizeF"/>.</returns>
95public static SizeF operator *(float left, SizeF right) => Multiply(right, left);
98/// Multiplies <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>.
100/// <param name="left">Multiplicand of type <see cref="SizeF"/>.</param>
102/// <returns>Product of type <see cref="SizeF"/>.</returns>
103public static SizeF operator *(SizeF left, float right) => Multiply(left, right);
106/// Divides <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>.
108/// <param name="left">Dividend of type <see cref="SizeF"/>.</param>
110/// <returns>Result of type <see cref="SizeF"/>.</returns>
111public static SizeF operator /(SizeF left, float right)
115/// Tests whether two <see cref='System.Drawing.SizeF'/> objects are identical.
117public static bool operator ==(SizeF sz1, SizeF sz2) => sz1.Width == sz2.Width && sz1.Height == sz2.Height;
120/// Tests whether two <see cref='System.Drawing.SizeF'/> objects are different.
122public static bool operator !=(SizeF sz1, SizeF sz2) => !(sz1 == sz2);
125/// Converts the specified <see cref='System.Drawing.SizeF'/> to a <see cref='System.Drawing.PointF'/>.
127public static explicit operator PointF(SizeF size) => new PointF(size.Width, size.Height);
130/// Tests whether this <see cref='System.Drawing.SizeF'/> has zero width and height.
136/// Represents the horizontal component of this <see cref='System.Drawing.SizeF'/>.
145/// Represents the vertical component of this <see cref='System.Drawing.SizeF'/>.
154/// Performs vector addition of two <see cref='System.Drawing.SizeF'/> objects.
156public static SizeF Add(SizeF sz1, SizeF sz2) => new SizeF(sz1.Width + sz2.Width, sz1.Height + sz2.Height);
159/// Contracts a <see cref='System.Drawing.SizeF'/> by another <see cref='System.Drawing.SizeF'/>.
161public static SizeF Subtract(SizeF sz1, SizeF sz2) => new SizeF(sz1.Width - sz2.Width, sz1.Height - sz2.Height);
164/// Tests to see whether the specified object is a <see cref='System.Drawing.SizeF'/> with the same dimensions
165/// as this <see cref='System.Drawing.SizeF'/>.
167public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is SizeF && Equals((SizeF)obj);
169public readonly bool Equals(SizeF other) => this == other;
178/// Creates a human-readable string that represents this <see cref='System.Drawing.SizeF'/>.
183/// Multiplies <see cref="SizeF"/> by a <see cref="float"/> producing <see cref="SizeF"/>.
185/// <param name="size">Multiplicand of type <see cref="SizeF"/>.</param>
188private static SizeF Multiply(SizeF size, float multiplier) =>
System.Private.Windows.Core (8)
System.Private.Windows.Core.Tests (1)
System.Windows.Forms (78)
System.Windows.Forms.Design (10)
System.Windows.Forms.Tests (47)