Search Results for

    Show / Hide Table of Contents

    Class PaddingLength

    A C# typedef to make sure that CSS PaddingBox sizes are never passed to/from methods that use CSS ContentBox or CSS MarginBox sizes etc (and vice versa).

    Note that we happily down-convert this to a float automatically (so it can be used anywhere a float is required, including: all Unity core APIs) but we never up-convert from a float (so that you can't naively pass a float into a method that was strongly-typed to require an actual PaddingLength instance)

    Inheritance
    Object
    PaddingLength
    Namespace: NinjaTools.FlexBuilder.CSS3
    Assembly: cs.temp.dll.dll
    Syntax
    public class PaddingLength

    Constructors

    - (void) PaddingLength(Single)

    Parameters
    Single f

    Properties

    - (BoxLength) asBoxLength

    ONLY use this inside a conversion routine, otherwise you lose all typesafety (and get corrupt results)

    - (Single) InternalFloatValue

    Do NOT directly fetch this unless you are writing an explicit 'convert' routine -- directly accessing this bypasses the compile-time checks that ensure you never accidentally mis-convert

    Methods

    - (Boolean) Equals(PaddingLength)

    Parameters
    PaddingLength cl
    Returns
    Boolean

    - (Boolean) Equals(Object)

    Parameters
    Object obj
    Returns
    Boolean
    Overrides
    Object.Equals(Object)

    - (Int32) GetHashCode()

    This is critical; without it, the float won't == the float when used inside Dictionary instances (not just directly, but even indirectly it will break any classes that use it as a member variable, etc)

    Returns
    Int32
    Overrides
    Object.GetHashCode()

    - (String) ToString()

    Returns
    String
    Overrides
    Object.ToString()

    - (Single) ZeroAlloc_Plus(Single)

    Parameters
    Single r
    Returns
    Single

    Operators

    - (PaddingLength) Addition(PaddingLength, PaddingLength)

    Parameters
    PaddingLength l
    PaddingLength r
    Returns
    PaddingLength

    - (PaddingLength) Addition(PaddingLength, Single)

    Parameters
    PaddingLength l
    Single r
    Returns
    PaddingLength

    - (Boolean) Equality(PaddingLength, PaddingLength)

    Parameters
    PaddingLength b1
    PaddingLength b2
    Returns
    Boolean

    - (Boolean) Inequality(PaddingLength, PaddingLength)

    Parameters
    PaddingLength b1
    PaddingLength b2
    Returns
    Boolean

    - (PaddingLength) Subtraction(PaddingLength, PaddingLength)

    Parameters
    PaddingLength l
    PaddingLength r
    Returns
    PaddingLength

    - (ContentLength) Subtraction(PaddingLength, PaddingValue)

    Parameters
    PaddingLength l
    PaddingValue r
    Returns
    ContentLength

    - (PaddingLength) Subtraction(PaddingLength, Single)

    Parameters
    PaddingLength l
    Single r
    Returns
    PaddingLength
    In This Article
    Back to top http://flexbuilder.ninja