 |
Gorgon Game Engine
|
Go to the documentation of this file.
4 #include "../Graphics/ScalableObject.h"
102 throw std::runtime_error(
"Provider is not set.");
109 throw std::runtime_error(
"Provider is not set.");
115 throw std::runtime_error(
"Provider is not set.");
122 throw std::runtime_error(
"Provider is not set.");
129 throw std::runtime_error(
"Provider is not set.");
136 throw std::runtime_error(
"Provider is not set.");
157 IScalableObjectProvider *prov =
nullptr;
basic_ScalableObject< A_ > & CreateAnimation(bool create=true) const override
Definition: ScalableObject.h:157
This class stores animations as a part of itself so that it can be moved around as a value rather tha...
Definition: Storage.h:21
SizeController GetController() const override
Returns the size controller.
Definition: ScalableObject.h:181
This class allows control over a sizable object.
Definition: Graphics.h:161
constexpr Type File
File.
Definition: GID.h:84
ScalableObject(Graphics::ScalableObjectProvider &&prov)
Creates a new tinted object using another tinted object provider.
Definition: ScalableObject.h:38
IScalableObjectProvider & MoveOutProvider() override
This function moves this animation provider into a new provider.
Definition: ScalableObject.cpp:209
Controllers are required to progress animations.
Definition: Animation.h:65
static ScalableObject * LoadResource(std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long size)
This function loads a tinted object resource from the file.
Definition: ScalableObject.cpp:34
virtual Graphics::ScalableObject & CreateAnimation(Gorgon::Animation::ControllerBase &timer) const override
This function should create a new animation with the given controller and if owner parameter is set t...
Definition: ScalableObject.h:120
virtual Graphics::ScalableObject & CreateAnimation(bool create=true) const override
This function should create and animation and depending on the create parameter, it should create its...
Definition: ScalableObject.h:127
For ease of use in resource system.
Definition: ScalableObject.h:11
RectangularAnimation & CreateBase() const override
Creates a base animation without controller.
Definition: ScalableObject.h:166
void SetProvider(Graphics::ScalableBitmapAnimationProvider &value)
Changes the provider stored in this tinted object, ownership will not be transferred.
Definition: ScalableObject.h:58
void SetProvider(Graphics::ScalableObjectProvider &value)
Changes the provider stored in this tinted object, ownership will not be transferred.
Definition: ScalableObject.h:64
void save(Writer &writer) const override
Definition: ScalableObject.cpp:133
Definition: ScalableObject.h:26
This object creates a scalable object from a graphic object.
Definition: ScalableObject.h:122
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
This class represents a 2D geometric size.
Definition: Size.h:23
GID::Type GetGID() const override
This function shall return Gorgon ID of this resource.
Definition: ScalableObject.h:47
virtual Graphics::RectangularAnimationStorage animmoveout() override
Definition: ScalableObject.cpp:205
This class denotes the resource is an image animation storage.
Definition: AnimationStorage.h:12
Rectangular drawable animation.
Definition: Animations.h:19
void AssumeProvider(Graphics::ScalableBitmapAnimationProvider &value)
Changes the provider stored in this tinted object, ownership will be transferred.
Definition: ScalableObject.h:77
void SetController(const SizeController &value) override
Sets the controller.
Definition: ScalableObject.h:186
basic_ScalableObjectProvider< RectangularAnimationProvider > ScalableObjectProvider
Definition: ScalableObject.h:275
This class allows resource objects to save their data to a stream.
Definition: Writer.h:59
void AssumeProvider(Graphics::ScalableBitmapProvider &value)
Changes the provider stored in this tinted object, ownership will be transferred.
Definition: ScalableObject.h:70
This is a tinted object resource.
Definition: ScalableObject.h:16
static void SaveThis(Writer &writer, const Graphics::IScalableObjectProvider &provider)
Definition: ScalableObject.cpp:152
@ Graphics
Definition: Template.h:164
basic_ScalableObjectProvider< Bitmap > ScalableBitmapProvider
Definition: ScalableObject.h:281
Geometry::Size GetSize() const override
Definition: ScalableObject.h:209
void RemoveProvider()
Removes the provider, if it is own by this resource it will be deleted.
Definition: ScalableObject.h:91
basic_ScalableObjectProvider< BitmapAnimationProvider > ScalableBitmapAnimationProvider
Definition: ScalableObject.h:278
ScalableObject(Graphics::ScalableBitmapAnimationProvider &&prov)
Creates a new tinted object using another tinted object provider.
Definition: ScalableObject.h:33
virtual void SetController(const Graphics::SizeController &value) override
Definition: ScalableObject.h:113
Type to store GID information.
Definition: GID.h:23
void SetProvider(Graphics::ScalableBitmapProvider &value)
Changes the provider stored in this tinted object, ownership will not be transferred.
Definition: ScalableObject.h:52
void AssumeProvider(Graphics::ScalableObjectProvider &value)
Changes the provider stored in this tinted object, ownership will be transferred.
Definition: ScalableObject.h:84
virtual Geometry::Size GetSize() const override
Definition: ScalableObject.h:134
ScalableObject(Graphics::ScalableBitmapProvider &&prov)
Creates a new tinted object using another tinted object provider.
Definition: ScalableObject.h:28
virtual Graphics::RectangularAnimation & CreateBase() const override
Definition: ScalableObject.h:100
virtual Graphics::SizeController GetController() const override
Definition: ScalableObject.h:107
ScalableObject()
Creates a new empty tinted object.
Definition: ScalableObject.h:43
constexpr Type ScalableObject
Definition: GID.h:247