Class Size

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll
API Level:
5

A three-dimensional size.

C#
Copy
public class Size : Disposable, ICloneable
Inheritance
Implements
ICloneable

Constructors

View Source

Size()

The constructor.

Declaration
C#
Copy
public 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.

API Level: 5
View Source

Size(Single, Single, Single)

The constructor.

Declaration
C#
Copy
public Size(float width, float height, float depth = 0F)
Parameters
Type Name Description
Single width

The width component.

Single height

The height component.

Single 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.

API Level: 5
View Source

Size(Size2D)

The constructor.

Declaration
C#
Copy
public Size(Size2D size2d)
Parameters
Type Name Description
Size2D size2d

Size2D with width and height.

API Level: 5

Properties

View Source

Depth

The Depth property for the depth component of size.

Declaration
C#
Copy
public float Depth { get; set; }
Property Value
Type Description
Single
Remarks

The setter is deprecated in API8 and will be removed in API10. Use new Size(...) constructor.

API Level: 5
View Source

Height

The Height property for the height component of size.

Declaration
C#
Copy
public float Height { get; set; }
Property Value
Type Description
Single
Remarks

The setter is deprecated in API8 and will be removed in API10. Use new Size(...) constructor.

API Level: 5
View Source

Item[UInt32]

The array subscript operator.

Declaration
C#
Copy
public float this[uint index] { get; }
Parameters
Type Name Description
UInt32 index

Subscript index.

Property Value
Type Description
Single

The float at the given index.

API Level: 5
View Source

Width

The Width property for the width component of size

Declaration
C#
Copy
public float Width { get; set; }
Property Value
Type Description
Single
Remarks

The setter is deprecated in API8 and will be removed in API10. Use new Size(...) constructor.

API Level: 5
View Source

Zero

The Zero constant, (0.0f, 0.0f, 0.0f).

Declaration
C#
Copy
public static Size Zero { get; }
Property Value
Type Description
Size
API Level: 5

Methods

View Source

Clone()

Declaration
C#
Copy
public object Clone()
Returns
Type Description
Object
View Source

Equals(Object)

Determines whether the specified object is equal to the current object.

Declaration
C#
Copy
public override bool Equals(Object obj)
Parameters
Type Name Description
Tizen.System.Object obj

The object to compare with the current object.

Returns
Type Description
Boolean

true if the specified object is equal to the current object; otherwise, false.

View Source

EqualTo(Size)

Checks equality.
Utilizes appropriate machine epsilon values.

Declaration
C#
Copy
public bool EqualTo(Size rhs)
Parameters
Type Name Description
Size rhs

The size to test against.

Returns
Type Description
Boolean

True if the sizes are equal.

API Level: 5
View Source

GetHashCode()

Gets the hash code of this Size.

Declaration
C#
Copy
public override int GetHashCode()
Returns
Type Description
Int32

The Hash Code.

API Level: 6
View Source

NotEqualTo(Size)

Checks inequality.
Utilizes appropriate machine epsilon values.

Declaration
C#
Copy
public bool NotEqualTo(Size rhs)
Parameters
Type Name Description
Size rhs

The size to test against.

Returns
Type Description
Boolean

True if the sizes are not equal.

API Level: 5
View Source

ReleaseSwigCPtr(Runtime.InteropServices.HandleRef)

Declaration
C#
Copy
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type Name Description
Tizen.System.Runtime.InteropServices.HandleRef swigCPtr
Overrides

Operators

View Source

Addition(Size, Size)

The addition operator for A+B.

Declaration
C#
Copy
public 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.

API Level: 5
View Source

Division(Size, Single)

The division operator.

Declaration
C#
Copy
public static Size operator /(Size arg1, float arg2)
Parameters
Type Name Description
Size arg1

Size for division.

Single arg2

The float value to scale the size by.

Returns
Type Description
Size

A Size containing the result of the scaling.

API Level: 5
View Source

Division(Size, Size)

The division operator.

Declaration
C#
Copy
public 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.

API Level: 5
View Source

Implicit(Size to Vector3)

The type cast operator, Size to Vector3.

Declaration
C#
Copy
public static implicit operator Vector3(Size size)
Parameters
Type Name Description
Size size

The object of size type.

Returns
Type Description
Vector3
API Level: 5
View Source

Implicit(Size2D to Size)

Implicit type cast operator, Size2D to Size

Declaration
C#
Copy
public static implicit operator Size(Size2D size2d)
Parameters
Type Name Description
Size2D size2d

The object of Size2D type.

Returns
Type Description
Size
API Level: none
View Source

Implicit(Vector3 to Size)

The type cast operator, Vector3 to Size type.

Declaration
C#
Copy
public static implicit operator Size(Vector3 vec)
Parameters
Type Name Description
Vector3 vec

The object of Vector3 type.

Returns
Type Description
Size
API Level: 5
View Source

Multiply(Size, Single)

The multiplication operator.

Declaration
C#
Copy
public static Size operator *(Size arg1, float arg2)
Parameters
Type Name Description
Size arg1

Size for multiplication.

Single arg2

The float value to scale the size.

Returns
Type Description
Size

A size containing the result of the scaling.

API Level: 5
View Source

Multiply(Size, Size)

The multiplication operator.

Declaration
C#
Copy
public 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.

API Level: 5
View Source

Subtraction(Size, Size)

The subtraction operator for A-B.

Declaration
C#
Copy
public 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.

API Level: 5
View Source

UnaryNegation(Size)

The unary negation operator.

Declaration
C#
Copy
public static Size operator -(Size arg1)
Parameters
Type Name Description
Size arg1

Size for unary negation.

Returns
Type Description
Size

A size containing the negation.

API Level: 5

Implements

ICloneable

Extension Methods