[]
Structure specifing a size with double Width and Height.
public struct Size2D : IEquatable<Size2D>
Initializes a new instance of the Size2D struct.
public Size2D(Size2F sz)
sz
Size2FInitializes a new instance of the Size2D struct.
public Size2D(double width, double height)
width
doubleheight
doubleInitializes a new instance of the Size2D struct.
public Size2D(SizeF sz)
sz
System.Drawing.SizeFAn empty size.
public static readonly Size2D Empty
The vertical component of this Size2D structure.
public double Height
A size with infinite Width and Height.
public static readonly Size2D Infinite
The size of the Size2D type, in bytes.
public const int SizeInBytes = 16
The horizontal component of this Size2D structure.
public double Width
Determines if all components of Size2D are equal to zero.
public bool IsEmpty { get; }
Adds the width and height of one Size2D structure to the width and height of another Size2D structure.
public static Size2D Add(Size2D sz1, Size2D sz2)
Indicates whether this instance and a specified object are equal.
public bool Equals(Size2D other)
other
Size2DIndicates 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 Size2D Scale(Size2D sz, double scaleX, double scaleY)
sz
Size2DscaleX
doublescaleY
doubleScales the width and height by the specified scaleFactor.
public static Size2D Scale(Size2D sz, double scaleFactor)
sz
Size2DscaleFactor
doubleScales the width and height by the specified scaleX and scaleY.
public void Scale(double scaleX, double scaleY)
scaleX
doublescaleY
doubleScales the width and height by the specified scaleFactor.
public void Scale(double scaleFactor)
scaleFactor
doubleSubtracts the width and height of one Size2D structure from the width and height of another Size2D structure.
public static Size2D Subtract(Size2D sz1, Size2D sz2)
public Size2F ToSize2F()
Converts Size2D 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 ==(Size2D left, Size2D right)
Determines if the specified values are not equal.
public static bool operator !=(Size2D left, Size2D right)