Struct LayoutLength

    Definition

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

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

    public struct LayoutLength : IEquatable<LayoutLength>
    Implements
    System.IEquatable<T><LayoutLength>

    Constructors

    View Source

    LayoutLength(int)

    Constructor from an int

    Declaration
    public LayoutLength(int value)
    Parameters
    Type Name Description
    int value

    Int to initialize with.

    View Source

    LayoutLength(float)

    Constructor from a float

    Declaration
    public LayoutLength(float value)
    Parameters
    Type Name Description
    float value

    Float to initialize with.

    View Source

    LayoutLength(LayoutLength)

    Constructor from a LayoutLength

    Declaration
    public LayoutLength(LayoutLength layoutLength)
    Parameters
    Type Name Description
    LayoutLength layoutLength

    LayoutLength object to initialize with.

    Methods

    View Source

    AsDecimal()

    Return value as the raw decimal value, best used for calculations

    Declaration
    public float AsDecimal()
    Returns
    Type Description
    float

    The layout length value as the raw decimal value.

    View Source

    AsRoundedValue()

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

    Declaration
    public float AsRoundedValue()
    Returns
    Type Description
    float

    The layout length value as a rounded whole number.

    View Source

    Equals(object)

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

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if equal LayoutLength, else false.

    Overrides
    System.ValueType.Equals(object)
    View Source

    Equals(LayoutLength)

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

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

    The LayoutLength to compare with the current LayoutLength.

    Returns
    Type Description
    bool

    true if equal LayoutLengths, else false.

    View Source

    GetHashCode()

    A hash code for the current object.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Calculated hash code.

    Overrides
    System.ValueType.GetHashCode()

    Operators

    View Source

    operator +(LayoutLength, int)

    The addition operator.

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

    The first value.

    int arg2

    The second value.

    Returns
    Type Description
    LayoutLength

    The LayoutLength containing the result of the addition.

    View Source

    operator +(LayoutLength, LayoutLength)

    The addition operator.

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

    View Source

    operator /(LayoutLength, int)

    Th division operator.

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

    The first value.

    int arg2

    The int value to scale the vector by.

    Returns
    Type Description
    LayoutLength

    The LayoutLength containing the result of the scaling.

    View Source

    operator /(LayoutLength, LayoutLength)

    The division operator.

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

    View Source

    operator ==(LayoutLength, LayoutLength)

    The == operator.

    Declaration
    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
    bool

    true if LayoutLengths are equal

    View Source

    operator !=(LayoutLength, LayoutLength)

    The != operator.

    Declaration
    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
    bool

    true if LayoutLengths are not equal

    View Source

    operator *(LayoutLength, int)

    Th multiplication operator.

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

    The first value.

    int arg2

    The int value to scale the LayoutLength.

    Returns
    Type Description
    LayoutLength

    The LayoutLength containing the result of the scaling.

    View Source

    operator *(LayoutLength, LayoutLength)

    The multiplication operator.

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

    View Source

    operator -(LayoutLength, int)

    The subtraction operator.

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

    The first value.

    int arg2

    The second value.

    Returns
    Type Description
    LayoutLength

    The LayoutLength containing the result of the subtraction.

    View Source

    operator -(LayoutLength, LayoutLength)

    The subtraction operator.

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

    Implements

    System.IEquatable<T>
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX