Table of Contents

Struct SizeD

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Represents the size of a rectangular region with an ordered pair of width and height.

[Serializable]
public struct SizeD : IEquatable<SizeD>
Implements

Constructors

SizeD(PointD)

Initializes a new instance of the SizeD class from the specified PointD.

SizeD(SizeD)

Initializes a new instance of the SizeD class from the specified existing SizeD.

SizeD(double)

Initializes a new instance of the SizeD struct.

SizeD(double, double)

Initializes a new instance of the SizeD class from the specified dimensions.

SizeD(Vector2)

Initializes a new instance of the SizeD struct from the specified Vector2.

Fields

Default

Gets SizeD with width and height equal to -1.

Empty

Gets SizeD with zero width and height.

MinusOne

Gets SizeD with width and height equal to -1.

NaN

Gets SizeD with width and height equal to (NaN, NaN).

One

Gets SizeD with width and height equal to 1.

PositiveInfinity

Gets SizeD with width and height equal to PositiveInfinity.

Properties

Abs

Gets SizeD with absolute values of (Width, Height).

AnyIsEmpty

Tests whether this SizeD has zero width or height.

AnyIsEmptyOrNegative

Tests whether this SizeD has zero (or negative) width or height.

Height

Represents the vertical component of this SizeD.

IsEmpty

Tests whether this SizeD has zero width and height.

Width

Represents the horizontal component of this SizeD.

Methods

Add(SizeD, SizeD)

Performs vector addition of two SizeD objects.

AnyIsNaN(SizeD)

Determines whether the specified value has width or height equal to NaN.

ApplyMax(SizeD)

Gets size with applied maximal limitations.

ApplyMin(SizeD)

Gets size with applied minimal limitations.

ApplyMinMax(SizeD, SizeD)

Gets size with applied minimal and maximal limitations.

Ceiling()

Returns new SizeD value with ceiling of the Width and Height. Uses Ceiling(double) on values.

ConvertToString(string, IFormatProvider)

Creates a string representation of this object based on the format string and IFormatProvider passed in. If the provider is null, the CurrentCulture is used. See the documentation for IFormattable for more information.

Equals(SizeD)

Indicates whether the current object is equal to another object of the same type.

Equals(object?)

Tests to see whether the specified object is a SizeD with the same dimensions as this SizeD.

GetHashCode()

Serves as the default hash function.

GetHeights(SizeD[])

Returns an array filled with heights of the specified SizeD values.

GetSize(bool)

Gets Width or Height depending on vert parameter value.

GetWidths(SizeD[])

Returns an array filled with widths of the specified SizeD values.

IsNaN(SizeD)

Determines whether the specified value is (NaN, NaN).

Max(SizeD, SizeD)

Gets maximal width and height from the two specified SizeD values.

MaxWidthHeight(SizeD[])

Returns the larger of the specified SizeD values.

Parse(string)

Parse - returns an instance converted from the provided string using the culture "en-US"

string with Size data
SetSize(bool, double)

Sets Width or Height depending on vert parameter value.

Subtract(SizeD, SizeD)

Contracts a SizeD by another SizeD.

ToPointF()

Converts a SizeD structure to a PointD structure.

ToSize()

Converts a SizeD structure to a SizeI structure.

ToString()

Creates a human-readable string that represents this SizeD.

ToVector2()

Creates a new Vector2 from this object.

Operators

operator +(SizeD, SizeD)

Performs vector addition of two SizeD objects.

operator /(SizeD, double)

Divides SizeD by a value producing SizeD.

operator ==(SizeD, SizeD)

Tests whether two SizeD objects are identical.

explicit operator PointD(SizeD)

Converts the specified SizeD to a PointD.

explicit operator Vector2(SizeD)

Converts the specified SizeD to a Vector2.

explicit operator SizeD(Vector2)

Converts the specified Vector2 to a SizeD.

implicit operator Size(SizeD)

Creates a Size with the properties of the specified SizeD

implicit operator SizeD(double)

Initializes SizeD with equal width and hegiht.

implicit operator SizeD(Size)

Creates a SizeD with the properties of the specified Size

implicit operator SizeD(int)

Initializes SizeD with equal width and hegiht.

implicit operator SizeD((double, double))

Implicit operator convertion from tuple with two double values to SizeD.

operator !=(SizeD, SizeD)

Tests whether two SizeD objects are different.

operator *(SizeD, double)

Multiplies SizeD by a value producing SizeD.

operator *(double, SizeD)

Multiplies SizeD by a value producing SizeD.

operator -(SizeD, SizeD)

Subtracts a SizeD by another SizeD