Struct LayoutLength

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll

[Draft] A type that represents a layout length. Currently, this implies pixels, but could be extended to handle device dependant sizes, etc.

C#
Copy
public struct LayoutLength : IEquatable<LayoutLength>
Implements
System.IEquatable<LayoutLength>

Constructors

View Source

LayoutLength(Int32)

[Draft] Constructor from an int

Declaration
C#
Copy
public LayoutLength(int value)
Parameters
Type Name Description
Int32 value

Int to initialize with.

API Level: 6
View Source

LayoutLength(Single)

[Draft] Constructor from a float

Declaration
C#
Copy
public LayoutLength(float value)
Parameters
Type Name Description
System.Single value

Float to initialize with.

API Level: 6
View Source

LayoutLength(LayoutLength)

[Draft] Constructor from a LayoutLength

Declaration
C#
Copy
public LayoutLength(LayoutLength layoutLength)
Parameters
Type Name Description
LayoutLength layoutLength

LayoutLength object to initialize with.

API Level: 6

Methods

View Source

AsDecimal()

[Draft] Return value as the raw decimal value, best used for calculations

Declaration
C#
Copy
public float AsDecimal()
Returns
Type Description
System.Single

The layout length value as the raw decimal value.

API Level: 6
View Source

AsRoundedValue()

[Draft] Return value as rounded value (whole number), best used as final output

Declaration
C#
Copy
public float AsRoundedValue()
Returns
Type Description
System.Single

The layout length value as a rounded whole number.

API Level: 6
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
System.Object obj

The object to compare with the current object.

Returns
Type Description
Boolean

true if equal LayoutLength, else false.

Overrides
API Level: 6
View Source

Equals(LayoutLength)

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

Declaration
C#
Copy
public bool Equals(LayoutLength layoutLength)
Parameters
Type Name Description
LayoutLength layoutLength

The LayoutLength to compare with the current LayoutLength.

Returns
Type Description
Boolean

true if equal LayoutLengths, else false.

API Level: 6
View Source

GetHashCode()

A hash code for the current object.

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

Calculated hash code.

Overrides
System.ValueType.GetHashCode()
API Level: 6

Operators

View Source

Addition(LayoutLength, Int32)

The addition operator.

Declaration
C#
Copy
public static LayoutLength operator +(LayoutLength arg1, int arg2)
Parameters
Type Name Description
LayoutLength arg1

The first value.

Int32 arg2

The second value.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the addition.

API Level: 6
View Source

Addition(LayoutLength, LayoutLength)

The addition operator.

Declaration
C#
Copy
public static LayoutLength operator +(LayoutLength arg1, LayoutLength arg2)
Parameters
Type Name Description
LayoutLength arg1

The first value.

LayoutLength arg2

The second value.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the addition.

API Level: 6
View Source

Division(LayoutLength, Int32)

Th division operator.

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

The first value.

Int32 arg2

The int value to scale the vector by.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the scaling.

API Level: 6
View Source

Division(LayoutLength, LayoutLength)

The division operator.

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

The first value.

LayoutLength arg2

The second value.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the division.

API Level: 6
View Source

Equality(LayoutLength, LayoutLength)

[Draft] The == operator.

Declaration
C#
Copy
public static bool operator ==(LayoutLength arg1, LayoutLength arg2)
Parameters
Type Name Description
LayoutLength arg1

The first value.

LayoutLength arg2

The second value

Returns
Type Description
Boolean

true if LayoutLengths are equal

API Level: 6
View Source

Inequality(LayoutLength, LayoutLength)

[Draft] The != operator.

Declaration
C#
Copy
public static bool operator !=(LayoutLength arg1, LayoutLength arg2)
Parameters
Type Name Description
LayoutLength arg1

The first value.

LayoutLength arg2

The second value

Returns
Type Description
Boolean

true if LayoutLengths are not equal

API Level: 6
View Source

Multiply(LayoutLength, Int32)

Th multiplication operator.

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

The first value.

Int32 arg2

The int value to scale the LayoutLength.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the scaling.

API Level: 6
View Source

Multiply(LayoutLength, LayoutLength)

The multiplication operator.

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

The first value.

LayoutLength arg2

The second value.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the multiplication.

API Level: 6
View Source

Subtraction(LayoutLength, Int32)

The subtraction operator.

Declaration
C#
Copy
public static LayoutLength operator -(LayoutLength arg1, int arg2)
Parameters
Type Name Description
LayoutLength arg1

The first value.

Int32 arg2

The second value.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the subtraction.

API Level: 6
View Source

Subtraction(LayoutLength, LayoutLength)

The subtraction operator.

Declaration
C#
Copy
public static LayoutLength operator -(LayoutLength arg1, LayoutLength arg2)
Parameters
Type Name Description
LayoutLength arg1

The first value.

LayoutLength arg2

The second value.

Returns
Type Description
LayoutLength

The LayoutLength containing the result of the subtraction.

API Level: 6

Implements

System.IEquatable<T>