 |
Gorgon Game Engine
|
Go to the documentation of this file.
4 #include "../Graphics/TintedObject.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 ITintedObjectProvider *prov =
nullptr;
virtual void SetColor(const Graphics::RGBAf &value) override
Definition: TintedObject.h:113
void save(Writer &writer) const override
Definition: TintedObject.cpp:128
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
constexpr Type File
File.
Definition: GID.h:84
Controllers are required to progress animations.
Definition: Animation.h:65
virtual Graphics::TintedObject & 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: TintedObject.h:120
void AssumeProvider(Graphics::TintedObjectProvider &value)
Changes the provider stored in this tinted object, ownership will be transferred.
Definition: TintedObject.h:84
Represents a four channel 32 bit float per channel color information.
Definition: Color.h:373
constexpr Type TintedObject
Definition: GID.h:244
This object creates a scalable object from a graphic object.
Definition: TintedObject.h:124
TintedObject(Graphics::TintedObjectProvider &&prov)
Creates a new tinted object using another tinted object provider.
Definition: TintedObject.h:38
For ease of use in resource system.
Definition: TintedObject.h:11
void SetColor(const RGBAf &value) override
Sets the tint color of the object.
Definition: TintedObject.h:188
This is a tinted object resource.
Definition: TintedObject.h:16
virtual Graphics::RGBAf GetColor() const override
Definition: TintedObject.h:107
void SetProvider(Graphics::TintedBitmapProvider &value)
Changes the provider stored in this tinted object, ownership will not be transferred.
Definition: TintedObject.h:52
TintedObject(Graphics::TintedBitmapProvider &&prov)
Creates a new tinted object using another tinted object provider.
Definition: TintedObject.h:28
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: TintedObject.h:47
ITintedObjectProvider & MoveOutProvider() override
This function moves this animation provider into a new provider.
Definition: TintedObject.cpp:204
RectangularAnimation & CreateBase() const override
Creates a base animation without controller.
Definition: TintedObject.h:168
This class denotes the resource is an image animation storage.
Definition: AnimationStorage.h:12
Rectangular drawable animation.
Definition: Animations.h:19
void SetProvider(Graphics::TintedObjectProvider &value)
Changes the provider stored in this tinted object, ownership will not be transferred.
Definition: TintedObject.h:64
basic_TintedObjectProvider< BitmapAnimationProvider > TintedBitmapAnimationProvider
Definition: TintedObject.h:280
This class allows resource objects to save their data to a stream.
Definition: Writer.h:59
basic_TintedObjectProvider< RectangularAnimationProvider > TintedObjectProvider
Definition: TintedObject.h:277
TintedObject()
Creates a new empty tinted object.
Definition: TintedObject.h:43
Definition: TintedObject.h:26
void SetProvider(Graphics::TintedBitmapAnimationProvider &value)
Changes the provider stored in this tinted object, ownership will not be transferred.
Definition: TintedObject.h:58
Geometry::Size GetSize() const override
Definition: TintedObject.h:211
RGBAf GetColor() const override
Returns the tint color.
Definition: TintedObject.h:183
virtual Graphics::RectangularAnimationStorage animmoveout() override
Definition: TintedObject.cpp:200
@ Graphics
Definition: Template.h:164
virtual Graphics::TintedObject & CreateAnimation(bool create=true) const override
This function should create and animation and depending on the create parameter, it should create its...
Definition: TintedObject.h:127
static void SaveThis(Writer &writer, const Graphics::ITintedObjectProvider &provider)
Definition: TintedObject.cpp:147
void AssumeProvider(Graphics::TintedBitmapProvider &value)
Changes the provider stored in this tinted object, ownership will be transferred.
Definition: TintedObject.h:70
virtual Geometry::Size GetSize() const override
Definition: TintedObject.h:134
void AssumeProvider(Graphics::TintedBitmapAnimationProvider &value)
Changes the provider stored in this tinted object, ownership will be transferred.
Definition: TintedObject.h:77
basic_TintedObjectProvider< Bitmap > TintedBitmapProvider
Definition: TintedObject.h:283
Type to store GID information.
Definition: GID.h:23
void RemoveProvider()
Removes the provider, if it is own by this resource it will be deleted.
Definition: TintedObject.h:91
basic_TintedObject< A_ > & CreateAnimation(bool create=true) const override
Definition: TintedObject.h:159
virtual Graphics::RectangularAnimation & CreateBase() const override
Definition: TintedObject.h:100
TintedObject(Graphics::TintedBitmapAnimationProvider &&prov)
Creates a new tinted object using another tinted object provider.
Definition: TintedObject.h:33
static TintedObject * 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: TintedObject.cpp:35