Table of Contents

Struct SizeI

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 SizeI : IEquatable<SizeI>
Implements

Constructors

SizeI(PointI)

Initializes a new instance of the SizeI class from the specified PointI.

SizeI(int)

Initializes a new instance of the SizeI struct with equal width and height.

SizeI(int, int)

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

Fields

Empty

Initializes a new instance of the SizeI class.

MinusOne

Gets a size with (-1, -1) values.

One

Gets a size with (1, 1) values.

Properties

Abs

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

AnyIsEmpty

Tests whether this SizeI has zero width or height.

Height

Represents the vertical component of this SizeI.

IsEmpty

Tests whether this SizeI has zero width and height.

PixelCount

Gets number of pixels (Width * Height).

Width

Represents the horizontal component of this SizeI.

Methods

Add(SizeI, SizeI)

Performs vector addition of two SizeI objects.

Ceiling(SizeD)

Converts a SizeF to a Size by performing a ceiling operation on all the coordinates.

Equals(SizeI)

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 SizeI with the same dimensions as this SizeI.

GetHashCode()

Returns a hash code.

Max(SizeI, SizeI)

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

PixelToDip(double?)

Converts pixels to device-independent units using specified scale factor.

Round(SizeD)

Converts a SizeF to a Size by performing a round operation on all the coordinates.

Subtract(SizeI, SizeI)

Contracts a SizeI by another SizeI .

ToString()

Creates a human-readable string that represents this SizeI.

Truncate(SizeD)

Converts a SizeF to a Size by performing a truncate operation on all the coordinates.

Operators

operator +(SizeI, SizeI)

Performs vector addition of two SizeI objects.

operator /(SizeI, double)

Divides SizeI by a double producing SizeD.

operator /(SizeI, int)

Divides SizeI by an int producing SizeI.

operator ==(SizeI, SizeI)

Tests whether two SizeI objects are identical.

explicit operator PointI(SizeI)

Converts the specified SizeI to a PointI.

implicit operator SizeD(SizeI)

Converts the specified SizeI to a SizeD.

implicit operator Size(SizeI)

Creates a Size with the coordinates of the specified SizeI

implicit operator SizeI(Size)

Creates a SizeI with the coordinates of the specified Size

implicit operator SizeI(int)

Converts the specified int to a SizeI. Width and height are set to the value.

implicit operator SizeI((int, int))

Implicit operator convertion from tuple with two int values to SizeI.

operator !=(SizeI, SizeI)

Tests whether two SizeI objects are different.

operator *(SizeI, double)

Multiplies SizeI by a double producing SizeD.

operator *(SizeI, int)

Multiplies SizeI by an int producing SizeI.

operator *(double, SizeI)

Multiplies SizeI by a double producing SizeD.

operator *(int, SizeI)

Multiplies a SizeI by an int producing SizeI.

operator -(SizeI, SizeI)

Contracts a SizeI by another SizeI