[]
Structure specifing a size with float Width and Height.
public struct Size2F : IEquatable<Size2F>
Initializes a new instance of the Size2F struct.
public Size2F(Size2D sz)
sz
Size2DInitializes a new instance of the Size2F struct.
public Size2F(Size2L sz)
sz
Size2LInitializes a new instance of the Size2F struct.
public Size2F(SizeF sz)
sz
System.Drawing.SizeFInitializes a new instance of the Size2F struct.
public Size2F(float width, float height)
width
floatheight
floatAn empty size.
public static readonly Size2F Empty
The vertical component of this Size2F structure.
public float Height
A size with infinite Width and Height.
public static readonly Size2F Infinite
The size of the Size2F type, in bytes.
public const int SizeInBytes = 8
The horizontal component of this Size2F structure.
public float Width
Determines if all components of Size2F are equal to zero.
public bool IsEmpty { get; }
Adds the width and height of one Size2F structure to the width and height of another Size2F structure.
public static Size2F Add(Size2F sz1, Size2F sz2)
Indicates whether this instance and a specified object are equal.
public bool Equals(Size2F other)
other
Size2FIndicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
obj
objectReturns a hash code for this instance.
public override int GetHashCode()
Returns a Size2L with rounded width and height.
public Size2L Round()
Scales the width and height by the specified scaleX and scaleY.
public static Size2F Scale(Size2F sz, float scaleX, float scaleY)
sz
Size2FscaleX
floatscaleY
floatScales the width and height by the specified scaleFactor.
public static Size2F Scale(Size2F sz, float scaleFactor)
sz
Size2FscaleFactor
floatScales the width and height by the specified scaleX and scaleY.
public void Scale(float scaleX, float scaleY)
scaleX
floatscaleY
floatScales the width and height by the specified scaleFactor.
public void Scale(float scaleFactor)
scaleFactor
floatSubtracts the width and height of one Size2F structure from the width and height of another Size2F structure.
public static Size2F Subtract(Size2F sz1, Size2F sz2)
public Size2D ToSize2D()
Converts Size2F to System.Drawing.SizeF.
public SizeF ToSizeF()
Returns a string that represents the current object.
public override string ToString()
Returns a Size2L with truncated width and height.
public Size2L Truncate()
Determines if the specified values are equal.
public static bool operator ==(Size2F left, Size2F right)
public static explicit operator Vector2(Size2F value)
value
Size2FPerforms an explicit conversion from Size2F to System.Drawing.SizeF.
public static explicit operator SizeF(Size2F value)
value
Size2Fpublic static explicit operator Size2F(Vector2 v)
v
Vector2Performs an explicit conversion from System.Drawing.SizeF to Size2F.
public static explicit operator Size2F(SizeF sz)
sz
System.Drawing.SizeFDetermines if the specified values are not equal.
public static bool operator !=(Size2F left, Size2F right)