Class Size
Definition
- Assembly:
- Tizen.NUI.dll
A three-dimensional size.
C#Copypublic class Size : Disposable, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic Size()
Remarks
Size2D and Size are implicitly converted to each other, so these are compatible and can be replaced without any type casting.
For example, the followings are possible.
view.Size2D = new Size(10.0f, 10.0f, 10.0f); // be aware that here the depth value(10.0f) will be lost.
view.Size = new Size2D(10, 10); // be aware that here the depth value is 0.0f by default.
view.MinimumSize = new Size(10, 10, 0);
Size Tmp = view.MaximumSize; //here Tmp.Depth will be 0.0f.
Declaration
C#Copypublic Size(float width, float height, float depth = 0)
Parameters
Type | Name | Description |
---|---|---|
float | width | The width component. |
float | height | The height component. |
float | depth | The depth component(optional). |
Remarks
Size2D and Size are implicitly converted to each other, so these are compatible and can be replaced without any type casting.
For example, the followings are possible.
view.Size2D = new Size(10.0f, 10.0f, 10.0f); // be aware that here the depth value(10.0f) will be lost.
view.Size = new Size2D(10, 10); // be aware that here the depth value is 0.0f by default.
view.MinimumSize = new Size(10, 10, 0);
Size Tmp = view.MaximumSize; //here Tmp.Depth will be 0.0f.
Declaration
C#Copypublic Size(Size2D size2d)
Parameters
Type | Name | Description |
---|---|---|
Size2D | size2d | Size2D with width and height. |
Properties
Declaration
C#Copypublic float Depth { get; set; }
Property Value
Type | Description |
---|---|
float |
Declaration
C#Copypublic float Height { get; set; }
Property Value
Type | Description |
---|---|
float |
Declaration
C#Copypublic float this[uint index] { get; }
Parameters
Type | Name | Description |
---|---|---|
uint | index | Subscript index. |
Property Value
Type | Description |
---|---|
float | The float at the given index. |
Declaration
C#Copypublic float Width { get; set; }
Property Value
Type | Description |
---|---|
float |
Declaration
C#Copypublic static Size Zero { get; }
Property Value
Type | Description |
---|---|
Size |
Methods
Declaration
C#Copypublic override bool Equals(Object obj)
Parameters
Type | Name | Description |
---|---|---|
Tizen.System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Declaration
C#Copypublic bool EqualTo(Size rhs)
Parameters
Type | Name | Description |
---|---|---|
Size | rhs | The size to test against. |
Returns
Type | Description |
---|---|
bool | True if the sizes are equal. |
Declaration
C#Copypublic override int GetHashCode()
Returns
Type | Description |
---|---|
int | The Hash Code. |
Overrides
Declaration
C#Copypublic bool NotEqualTo(Size rhs)
Parameters
Type | Name | Description |
---|---|---|
Size | rhs | The size to test against. |
Returns
Type | Description |
---|---|
bool | True if the sizes are not equal. |
Operators
Declaration
C#Copypublic static Size operator +(Size arg1, Size arg2)
Parameters
Type | Name | Description |
---|---|---|
Size | arg1 | Size to assign A. |
Size | arg2 | Size to assign B. |
Returns
Type | Description |
---|---|
Size | A size containing the result of the addition. |
Declaration
C#Copypublic static Size operator /(Size arg1, float arg2)
Parameters
Type | Name | Description |
---|---|---|
Size | arg1 | Size for division. |
float | arg2 | The float value to scale the size by. |
Returns
Type | Description |
---|---|
Size | A Size containing the result of the scaling. |
Declaration
C#Copypublic static Size operator /(Size arg1, Size arg2)
Parameters
Type | Name | Description |
---|---|---|
Size | arg1 | Size for division. |
Size | arg2 | The size to divide. |
Returns
Type | Description |
---|---|
Size | A size containing the result of the division. |
Declaration
C#Copypublic static implicit operator Vector3(Size size)
Parameters
Type | Name | Description |
---|---|---|
Size | size | The object of size type. |
Returns
Type | Description |
---|---|
Vector3 |
Declaration
C#Copypublic static implicit operator Size(Vector3 vec)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vec | The object of Vector3 type. |
Returns
Type | Description |
---|---|
Size |
Declaration
C#Copypublic static Size operator *(Size arg1, float arg2)
Parameters
Type | Name | Description |
---|---|---|
Size | arg1 | Size for multiplication. |
float | arg2 | The float value to scale the size. |
Returns
Type | Description |
---|---|
Size | A size containing the result of the scaling. |
Declaration
C#Copypublic static Size operator *(Size arg1, Size arg2)
Parameters
Type | Name | Description |
---|---|---|
Size | arg1 | Size for multiplication. |
Size | arg2 | The size to multiply. |
Returns
Type | Description |
---|---|
Size | A size containing the result of the multiplication. |
Declaration
C#Copypublic static Size operator -(Size arg1, Size arg2)
Parameters
Type | Name | Description |
---|---|---|
Size | arg1 | Size to subtract A. |
Size | arg2 | Size to subtract B. |
Returns
Type | Description |
---|---|
Size | The size containing the result of the subtraction. |
Declaration
C#Copypublic static Size operator -(Size arg1)
Parameters
Type | Name | Description |
---|---|---|
Size | arg1 | Size for unary negation. |
Returns
Type | Description |
---|---|
Size | A size containing the negation. |