Class Size2D
Definition
- Assembly:
- Tizen.NUI.dll
A two-dimensional size.
C#Copypublic class Size2D : Disposable, IDisposable, ICloneable
- Inheritance
- Implements
-
System.IDisposableSystem.ICloneable
Constructors
Declaration
C#Copypublic Size2D()
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 Size2D(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width component. |
| int | height | The height component. |
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.
Properties
Declaration
C#Copypublic int Height { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Size2D(...) constructor.
Declaration
C#Copypublic float this[uint index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| uint | index | The subscript index. |
Property Value
| Type | Description |
|---|---|
| float | The float at the given index. |
Declaration
C#Copypublic int Width { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Size2D(...) constructor.
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(Size2D rhs)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | 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(Size2D rhs)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | rhs | The size to test against. |
Returns
| Type | Description |
|---|---|
| bool | True if the sizes are not equal. |
Operators
Declaration
C#Copypublic static Size2D operator +(Size2D arg1, Size2D arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | arg1 | Size A. |
| Size2D | arg2 | Size to assign B. |
Returns
| Type | Description |
|---|---|
| Size2D | A size containing the result of the addition. |
Declaration
C#Copypublic static Size2D operator /(Size2D arg1, int arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | arg1 | Size for division. |
| int | arg2 | The integer value to scale the size by. |
Returns
| Type | Description |
|---|---|
| Size2D | A size containing the result of the scaling. |
Declaration
C#Copypublic static Size2D operator /(Size2D arg1, Size2D arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | arg1 | Size for division. |
| Size2D | arg2 | Size to divide. |
Returns
| Type | Description |
|---|---|
| Size2D | A size containing the result of the division. |
Declaration
C#Copypublic static implicit operator Vector2(Size2D size)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | size | An object of the Size2D type. |
Returns
| Type | Description |
|---|---|
| Vector2 | return a Vector2 instance |
Declaration
C#Copypublic static implicit operator Size2D(Vector2 vector2)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | vector2 | An object of the Vector2 type. |
Returns
| Type | Description |
|---|---|
| Size2D | return a Size2D instance |
Declaration
C#Copypublic static Size2D operator *(Size2D arg1, int arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | arg1 | Size for multiplication |
| int | arg2 | The integer value to scale the size. |
Returns
| Type | Description |
|---|---|
| Size2D | A size containing the result of the scaling. |
Declaration
C#Copypublic static Size2D operator *(Size2D arg1, Size2D arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | arg1 | Size for multiplication. |
| Size2D | arg2 | Size to multiply. |
Returns
| Type | Description |
|---|---|
| Size2D | A size containing the result of the multiplication. |
Declaration
C#Copypublic static Size2D operator -(Size2D arg1, Size2D arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | arg1 | Size A. |
| Size2D | arg2 | Size to subtract B. |
Returns
| Type | Description |
|---|---|
| Size2D | A size containing the result of the subtraction. |
Declaration
C#Copypublic static Size2D operator -(Size2D arg1)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2D | arg1 | Size for unary negation. |
Returns
| Type | Description |
|---|---|
| Size2D | A size containing the negation. |