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(SKSizeI)

Initializes a new instance of the SizeI struct using the specified SKSizeI.

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.

NinetySix

Represents a predefined size with a width and height of 96 units each.

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.

AnyIsEmptyOrNegative

Tests whether this SizeI has zero or negative width or height.

Height

Represents the vertical component of this SizeI.

IsEmpty

Tests whether this SizeI has zero width and height.

MaxWidthHeight

Gets maximal of width and height.

MinWidthHeight

Gets minimal of width and height.

PixelCount

Gets number of pixels (Width * Height).

SameWidthHeight

Gets whether width and height are equal.

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.

Multiply(SizeI, int)

Multiplies SizeI by an int producing SizeI.

Multiply(SizeI, float)

Multiplies SizeI by a coordinate producing SizeD.

PixelToDip(float?)

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 .

ToSkiaPoint()

Converts the current instance to an SKPointI.

ToSkiaSize()

Converts the current instance to an SKSizeI structure.

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.

WithHeight(int)

Creates new SizeI with the width of this object and the specified height.

WithWidth(int)

Creates new SizeI with the height of this object and the specified width.

Operators

operator +(SizeI, SizeI)

Performs vector addition of two SizeI objects.

operator /(SizeI, int)

Divides SizeI by an int producing SizeI.

operator /(SizeI, float)

Divides SizeI by a coordinate producing SizeD.

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 SKSizeI(SizeI)

Implicitly converts a SizeI instance to an SKSizeI instance.

implicit operator Size(SizeI)

Creates a Size with the coordinates of the specified SizeI

implicit operator SizeI(SKSizeI)

Converts an SKSizeI to a 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 Width, int Height))

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

operator !=(SizeI, SizeI)

Tests whether two SizeI objects are different.

operator *(SizeI, int)

Multiplies SizeI by an int producing SizeI.

operator *(SizeI, float)

Multiplies SizeI by a coordinate producing SizeD.

operator *(int, SizeI)

Multiplies a SizeI by an int producing SizeI.

operator *(float, SizeI)

Multiplies SizeI by a coordinate value producing SizeD.

operator -(SizeI, SizeI)

Contracts a SizeI by another SizeI