 |
Gorgon Game Engine
|
Go to the documentation of this file.
4 #include "../Graphics/Line.h"
7 namespace Gorgon {
namespace Resource {
102 throw std::runtime_error(
"Provider is not set.");
109 throw std::runtime_error(
"Provider is not set.");
116 throw std::runtime_error(
"Provider is not set.");
123 throw std::runtime_error(
"Provider is not set.");
130 throw std::runtime_error(
"Provider is not set.");
137 throw std::runtime_error(
"Provider is not set.");
144 throw std::runtime_error(
"Provider is not set.");
151 throw std::runtime_error(
"Provider is not set.");
158 throw std::runtime_error(
"Provider is not set.");
165 throw std::runtime_error(
"Provider is not set.");
171 static Line *
LoadResource(std::weak_ptr<File> file, std::shared_ptr<Reader> reader,
unsigned long size);
void AssumeProvider(Graphics::BitmapLineProvider &value)
Changes the provider stored in this line, ownership will be transferred.
Definition: Line.h:70
Orientation
2D orientation constants
Definition: Graphics.h:39
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
Line(Graphics::AnimatedBitmapLineProvider &&prov)
Creates a new line using another line provider.
Definition: Line.h:33
virtual Gorgon::Graphics::Line & CreateAnimation(bool create=true) const override
This function should create and animation and depending on the create parameter, it should create its...
Definition: Line.h:156
constexpr Type File
File.
Definition: GID.h:84
void RemoveProvider()
Removes the provider, if it is owned by this resource it will be deleted.
Definition: Line.h:91
virtual bool GetTiling() const override
Returns if the middle part will be tiled.
Definition: Line.h:142
Line(Graphics::BitmapLineProvider &&prov)
Creates a new line using another line provider.
Definition: Line.h:28
virtual Gorgon::Graphics::Line & 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: Line.h:149
basic_LineProvider< RectangularAnimationProvider > LineProvider
Definition: Line.h:362
virtual void SetOrientation(Graphics::Orientation value) override
Changes the orientation of the provider.
Definition: Line.h:121
Controllers are required to progress animations.
Definition: Animation.h:65
static void SaveThis(Writer &writer, const Graphics::ILineProvider &provider)
Definition: Line.cpp:175
This is a line resource, it stores a Graphics::LineProvider.
Definition: Line.h:16
void AssumeProvider(Graphics::LineProvider &value)
Changes the provider stored in this line, ownership will be transferred.
Definition: Line.h:84
virtual Graphics::RectangularAnimation & CreateMiddle() const override
Creates a start animation without controller. This function should always return an animation.
Definition: Line.h:107
void SetProvider(Graphics::BitmapLineProvider &value)
Changes the provider stored in this line, ownership will not be transferred.
Definition: Line.h:52
Line(Graphics::LineProvider &&prov)
Creates a new line using another line provider.
Definition: Line.h:38
virtual void SetTiling(bool value) override
Sets whether the middle part would be tiled.
Definition: Line.h:135
void AssumeProvider(Graphics::AnimatedBitmapLineProvider &value)
Changes the provider stored in this line, ownership will be transferred.
Definition: Line.h:77
constexpr Type Line
Definition: GID.h:234
void SetProvider(Graphics::AnimatedBitmapLineProvider &value)
Changes the provider stored in this line, ownership will not be transferred.
Definition: Line.h:58
virtual Geometry::Size GetSize() const override
Definition: Line.h:163
void save(Writer &writer) const override
Definition: Line.cpp:156
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
This class represents a 2D geometric size.
Definition: Size.h:23
ILineProvider & MoveOutProvider() override
This function moves this animation provider into a new provider.
Definition: Line.cpp:236
virtual Graphics::RectangularAnimation & CreateEnd() const override
Creates a start animation without controller. This function should always return an animation.
Definition: Line.h:114
This class allows drawing a line like image that is made out of three parts.
Definition: Line.h:61
GID::Type GetGID() const override
This function shall return Gorgon ID of this resource.
Definition: Line.h:47
virtual RectangularAnimation & CreateEnd() const override
Creates a start animation without controller. This function should always return an animation.
Definition: Line.h:235
Line()
Creates a new empty line.
Definition: Line.h:43
This class denotes the resource is an image animation storage.
Definition: AnimationStorage.h:12
Rectangular drawable animation.
Definition: Animations.h:19
basic_LineProvider< Bitmap > BitmapLineProvider
Definition: Line.h:363
Interface for LineProviders.
Definition: Line.h:12
This class allows instancing of a line like image that is made out of three parts.
Definition: Line.h:162
Line & 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: Line.h:213
virtual bool GetTiling() const
Returns if the middle part will be tiled.
Definition: Line.h:47
static Line * LoadResource(std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long size)
This function loads a line resource from the file.
Definition: Line.cpp:44
This class allows resource objects to save their data to a stream.
Definition: Writer.h:59
basic_LineProvider< BitmapAnimationProvider > AnimatedBitmapLineProvider
Definition: Line.h:364
void SetProvider(Graphics::LineProvider &value)
Changes the provider stored in this line, ownership will not be transferred.
Definition: Line.h:64
virtual void SetOrientation(Orientation value)
Changes the orientation of the provider.
Definition: Line.h:30
virtual Graphics::Orientation GetOrientation() const override
Returns the orientation of the line provider.
Definition: Line.h:128
@ Graphics
Definition: Template.h:164
virtual Orientation GetOrientation() const
Returns the orientation of the line provider.
Definition: Line.h:35
Geometry::Size GetSize() const override
Definition: Line.h:306
virtual void SetTiling(bool value)
Sets whether the middle part would be tiled.
Definition: Line.h:42
virtual RectangularAnimation & CreateStart() const override
Creates a start animation without controller. This function should always return an animation.
Definition: Line.h:221
Type to store GID information.
Definition: GID.h:23
virtual Graphics::RectangularAnimationStorage animmoveout() override
Definition: Line.cpp:232
virtual RectangularAnimation & CreateMiddle() const override
Creates a start animation without controller. This function should always return an animation.
Definition: Line.h:228
ILineProvider(Orientation orientation)
Definition: Line.h:14
virtual Graphics::RectangularAnimation & CreateStart() const override
Creates a start animation without controller. This function should always return an animation.
Definition: Line.h:100