![]() |
Gorgon Game Engine
|
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 |
RectangularAnimation & | CreateBase () 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... | |
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.
using AnimationType = typename A_::AnimationType |
|
default |
Empty constructor.
|
explicit |
Filling constructor.
|
explicit |
basic_ScalableObjectProvider | ( | basic_ScalableObjectProvider< A_ > && | other | ) |
|
override |
|
override |
|
override |
Creates a base animation without controller.
References EmptyImage::Instance().
A_* GetBase | ( | ) | const |
Returns the base component. Could return nullptr.
|
override |
Returns the size controller.
|
override |
|
overridevirtual |
void OwnProvider | ( | ) |
Assumes the ownership of the providers.
void Prepare | ( | ) |
Prepares the providers.
Provider type should support this operation, otherwise this function will cause a compile time error.
void SetBase | ( | A_ * | value | ) |
Sets the base provider, ownership semantics will not be changed.
|
override |
Sets the controller.