Open Search
    DrawRect< T > Struct Template Reference

    #include <gfx_basictypes.h>

    Detailed Description

    template<typename T>
    struct maxon::DrawRect< T >

    Definition of a rectangle used for window/draw operations.

    Public Member Functions

     DrawRect (Vec2< T, 1 > positionValue, DrawDimension< T > sizeValue)
     
     DrawRect (T x, T y, T w, T h)
     
    MAXON_IMPLICIT DrawRect (const Range< Vec2< T, 1 >> &src)
     
     DrawRect ()
     
    Bool Contains (const Vec2< T, 1 > &point) const
     
    String ToString (const FormatStatement *formatStatement=nullptr) const
     
     MAXON_OPERATOR_EQUALITY_HASHCODE (DrawRect, position, size)
     

    Static Public Member Functions

    static Result< void > DescribeIO (const DataSerializeInterface &stream)
     

    Public Attributes

    Vec2< T, 1 > position
     
    DrawDimension< T > size
     

    Constructor & Destructor Documentation

    ◆ DrawRect() [1/4]

    DrawRect ( Vec2< T, 1 >  positionValue,
    DrawDimension< T >  sizeValue 
    )

    ◆ DrawRect() [2/4]

    DrawRect ( x,
    y,
    w,
    h 
    )

    ◆ DrawRect() [3/4]

    MAXON_IMPLICIT DrawRect ( const Range< Vec2< T, 1 >> &  src)

    ◆ DrawRect() [4/4]

    DrawRect ( )

    Member Function Documentation

    ◆ Contains()

    Bool Contains ( const Vec2< T, 1 > &  point) const

    ◆ ToString()

    String ToString ( const FormatStatement formatStatement = nullptr) const

    Returns a readable string of the content.

    Parameters
    [in]formatStatementNullptr or additional formatting instruction. Currently no additional formatting instructions are supported.
    Returns
    The converted result.

    ◆ MAXON_OPERATOR_EQUALITY_HASHCODE()

    MAXON_OPERATOR_EQUALITY_HASHCODE ( DrawRect< T >  ,
    position  ,
    size   
    )

    ◆ DescribeIO()

    static Result<void> DescribeIO ( const DataSerializeInterface stream)
    static

    Describe all elements of this class for I/O operations.

    Parameters
    [in]streamThe stream that is used to register the class members.
    Returns
    OK on success.

    Member Data Documentation

    ◆ position

    Vec2<T,1> position

    ◆ size

    DrawDimension<T> size