124 instantiations of SizeF
Accessibility_Core_App (13)
BinaryFormatTests (4)
DesignSurface (1)
NativeHost.ManagedControl (1)
PresentationUI (11)
System.ComponentModel.TypeConverter (2)
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.Windows.Forms (14)
System.Windows.Forms.Design (4)
System.Windows.Forms.Tests (15)
TrimTest (1)
TrimTestBinaryDeserialization (1)
WindowsFormsIntegration (1)
WinFormsControlsTest (37)
301 references to SizeF
BinaryFormatTests (1)
Microsoft.VisualBasic.Forms (1)
netstandard (1)
PresentationCore.Tests (1)
System.ComponentModel.TypeConverter (3)
System.Data.Common (1)
System.Drawing (1)
System.Drawing.Common (11)
Special\NotSupported.cs (11)
643public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
644public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, System.Drawing.PointF origin, System.Drawing.StringFormat? stringFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
645public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, System.Drawing.SizeF layoutArea) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
646public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, System.Drawing.SizeF layoutArea, System.Drawing.StringFormat? stringFormat) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
647public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, System.Drawing.SizeF layoutArea, System.Drawing.StringFormat? stringFormat, out int charactersFitted, out int linesFilled) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
648public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, int width) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
649public System.Drawing.SizeF MeasureString(string? text, System.Drawing.Font font, int width, System.Drawing.StringFormat? format) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
758public System.Drawing.SizeF PhysicalDimension { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
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 (6)
System.Windows.Forms (80)
System.Windows.Forms.Design (10)
System.Windows.Forms.Tests (48)