Gorgon Game Engine
basic_ScalableObjectProvider< 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_ScalableObjectProvider ()=default
 Empty constructor. More...
 
 basic_ScalableObjectProvider (A_ &&base, const SizeController &controller=Tiling::Both)
 
 basic_ScalableObjectProvider (A_ &base, const SizeController &controller=Tiling::Both)
 Filling constructor. More...
 
 basic_ScalableObjectProvider (basic_ScalableObjectProvider &&other)
 
 ~basic_ScalableObjectProvider ()
 
basic_ScalableObject< A_ > & CreateAnimation (bool create=true) const override
 
basic_ScalableObject< 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...
 
SizeController GetController () const override
 Returns the size controller. 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 SetController (const SizeController &value) override
 Sets the controller. More...
 

Detailed Description

template<class A_>
class Gorgon::Graphics::basic_ScalableObjectProvider< 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
SizeController

Member Typedef Documentation

◆ AnimationType

using AnimationType = typename A_::AnimationType

Constructor & Destructor Documentation

◆ basic_ScalableObjectProvider() [1/4]

Empty constructor.

◆ basic_ScalableObjectProvider() [2/4]

basic_ScalableObjectProvider ( A_ &  base,
const SizeController controller = Tiling::Both 
)
explicit

Filling constructor.

◆ basic_ScalableObjectProvider() [3/4]

basic_ScalableObjectProvider ( A_ &&  base,
const SizeController controller = Tiling::Both 
)
explicit

◆ basic_ScalableObjectProvider() [4/4]

◆ ~basic_ScalableObjectProvider()

Member Function Documentation

◆ CreateAnimation() [1/2]

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

◆ CreateAnimation() [2/2]

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

◆ GetController()

SizeController GetController ( ) const
override

Returns the size controller.

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

◆ SetController()

void SetController ( const SizeController value)
override

Sets the controller.


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