Gorgon Game Engine
basic_TintedObjectProvider< A_ > Class Template Reference

This object creates a scalable object from a graphic object. More...

Public Types

using AnimationType = typename A_::AnimationType
 

Public Member Functions

 basic_TintedObjectProvider ()=default
 Empty constructor. More...
 
 basic_TintedObjectProvider (A_ &&base, const RGBAf &color=1.f)
 
 basic_TintedObjectProvider (A_ &base, const RGBAf &color=1.f)
 Filling constructor. More...
 
 basic_TintedObjectProvider (basic_TintedObjectProvider &&other)
 
 ~basic_TintedObjectProvider ()
 
basic_TintedObject< A_ > & CreateAnimation (bool create=true) const override
 
basic_TintedObject< A_ > & CreateAnimation (Gorgon::Animation::ControllerBase &timer) const override
 
RectangularAnimationCreateBase () const override
 Creates a base animation without controller. More...
 
A_ * GetBase () const
 Returns the base component. Could return nullptr. More...
 
RGBAf GetColor () const override
 Returns the tint color. More...
 
Geometry::Size GetSize () const override
 
virtual auto MoveOutProvider () -> decltype(*this) override
 
void OwnProvider ()
 Assumes the ownership of the providers. More...
 
void Prepare ()
 Prepares the providers. More...
 
void SetBase (A_ *value)
 Sets the base provider, ownership semantics will not be changed. More...
 
void SetColor (const RGBAf &value) override
 Sets the tint color of the object. More...
 

Detailed Description

template<class A_>
class Gorgon::Graphics::basic_TintedObjectProvider< A_ >

This object creates a scalable object from a graphic object.

A scalable object is controlled by a size controller which may dictate the image to be drawn at original size, stretched or tiled. It also allows finer control for tiling. Size control is only active if the image is drawn using DrawIn without specifying a size controller. If a size controller is specified, it will be used instead.

See also
RGBAf

Member Typedef Documentation

◆ AnimationType

using AnimationType = typename A_::AnimationType

Constructor & Destructor Documentation

◆ basic_TintedObjectProvider() [1/4]

Empty constructor.

◆ basic_TintedObjectProvider() [2/4]

basic_TintedObjectProvider ( A_ &  base,
const RGBAf color = 1.f 
)
explicit

Filling constructor.

◆ basic_TintedObjectProvider() [3/4]

basic_TintedObjectProvider ( A_ &&  base,
const RGBAf color = 1.f 
)
explicit

◆ basic_TintedObjectProvider() [4/4]

◆ ~basic_TintedObjectProvider()

Member Function Documentation

◆ CreateAnimation() [1/2]

basic_TintedObject<A_>& CreateAnimation ( bool  create = true) const
override

◆ CreateAnimation() [2/2]

basic_TintedObject<A_>& CreateAnimation ( Gorgon::Animation::ControllerBase timer) const
override

◆ CreateBase()

RectangularAnimation& CreateBase ( ) const
override

Creates a base animation without controller.

References EmptyImage::Instance().

◆ GetBase()

A_* GetBase ( ) const

Returns the base component. Could return nullptr.

◆ GetColor()

RGBAf GetColor ( ) const
override

Returns the tint color.

◆ GetSize()

Geometry::Size GetSize ( ) const
override

◆ MoveOutProvider()

virtual auto MoveOutProvider ( ) -> decltype(*this)
overridevirtual

◆ OwnProvider()

void OwnProvider ( )

Assumes the ownership of the providers.

◆ Prepare()

void Prepare ( )

Prepares the providers.

Provider type should support this operation, otherwise this function will cause a compile time error.

◆ SetBase()

void SetBase ( A_ *  value)

Sets the base provider, ownership semantics will not be changed.

◆ SetColor()

void SetColor ( const RGBAf value)
override

Sets the tint color of the object.


The documentation for this class was generated from the following file: