Struct Size
Struct defining height and width as a pair of doubles.
Inherited Members
Namespace: Tizen.UIExtensions.Common
Assembly: Tizen.UIExtensions.NUI.dll
Syntax
public struct Size
Constructors
Size(Double, Double)
Creates a new Size object with width and height.
Declaration
public Size(double width, double height)
Parameters
Type | Name | Description |
---|---|---|
System.Double | width | The width of the new size. |
System.Double | height | The height of the new size. |
Fields
Zero
The Size whose values for height and width are 0.0.
Declaration
public static readonly Size Zero
Field Value
Type | Description |
---|---|
Size |
Properties
Height
Magnitude along the vertical axis, in platform-specific units.
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
IsZero
Whether the Size has Height and Width of 0.0.
Declaration
public bool IsZero { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Width
Magnitude along the horizontal axis, in platform-defined units.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
Deconstruct(out Double, out Double)
Declaration
public void Deconstruct(out double width, out double height)
Parameters
Type | Name | Description |
---|---|---|
System.Double | width | |
System.Double | height |
Equals(Object)
Whether thisSize is equivalent to obj.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to which this is being compared. |
Returns
Type | Description |
---|---|
System.Boolean | true if obj is a Size whose values are identical to thisSize's Height and Width. |
Overrides
Equals(Size)
Whether thisSize is equivalent to other.
Declaration
public bool Equals(Size other)
Parameters
Type | Name | Description |
---|---|---|
Size | other | The Size to which this is being compared. |
Returns
Type | Description |
---|---|
System.Boolean | true if other's values are identical to thisSize's Height and Width. |
GetHashCode()
Returns a hash value for the Size.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A value intended for efficient insertion and lookup in hashtable-based data structures. |
Overrides
ToString()
Returns a human-readable representation of the Size.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The format has the pattern "{Width={0} Height={1}}". |
Overrides
Operators
Addition(Size, Size)
Returns a new Size whose Height and Width are the sum of the component's height and width.
Declaration
public static Size operator +(Size s1, Size s2)
Parameters
Type | Name | Description |
---|---|---|
Size | s1 | A Size to be added. |
Size | s2 | A Size to be added. |
Returns
Type | Description |
---|---|
Size | A Size whose Width is equal to s1.Width + s2.Width and whose Height is equal to sz1.Height + sz2.Height. |
Equality(Size, Size)
Whether two Sizes have equal values.
Declaration
public static bool operator ==(Size s1, Size s2)
Parameters
Type | Name | Description |
---|---|---|
Size | s1 | A Size to be compared. |
Size | s2 | A Size to be compared. |
Returns
Type | Description |
---|---|
System.Boolean | true if s1 and s2 have equal values for Height and Width. |
Explicit(Size to Point)
Returns a new Point based on a Size.
Declaration
public static explicit operator Point(Size size)
Parameters
Type | Name | Description |
---|---|---|
Size | size | The Size to be converted to a Point. |
Returns
Type | Description |
---|---|
Point | A Point whose X and Y are equal to size's Width and Height, respectively. |
Inequality(Size, Size)
Whether two Sizes have unequal values.
Declaration
public static bool operator !=(Size s1, Size s2)
Parameters
Type | Name | Description |
---|---|---|
Size | s1 | The first Size to compare. |
Size | s2 | The second Size to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if s1 and s2 have unequal values for either Height or Width. |
Multiply(Size, Double)
Scales both Width and Height.
Declaration
public static Size operator *(Size s1, double value)
Parameters
Type | Name | Description |
---|---|---|
Size | s1 | A Size to be scaled. |
System.Double | value | A factor by which to multiple s1's Width and Height values. |
Returns
Type | Description |
---|---|
Size | A new Size whose Width and Height have been scaled by value. |
Subtraction(Size, Size)
Returns a new Size whose Height and Width are s1's height and width minus the values in s2.
Declaration
public static Size operator -(Size s1, Size s2)
Parameters
Type | Name | Description |
---|---|---|
Size | s1 | A Size from whose values a size will be subtracted. |
Size | s2 | The Size to subtract from s1. |
Returns
Type | Description |
---|---|
Size | A Size whose Width is equal to s1.Width - s2.Width and whose Height is equal to sz1.Height - sz2.Height. |