Go to the documentation of this file.
25 Image(
const std::string &filename,
bool lonely =
false);
34 ~Image()
override =
default;
38 bool exportTo(
const std::string &outputPath);
53 Image &
use(
const std::string &filename);
66 operator ::Image()
const;
bool exportTo(const std::string &outputPath)
export to file
Definition: Image.cpp:30
void draw(Drawables::ADrawable2D &)
draw drawable on image
Definition: Image.cpp:55
static Cache<::Image > _imagesCache
Definition: Image.hpp:59
Definition: Window.hpp:32
A Two-dimensionnal Vector data type.
Definition: Vector2.hpp:15
Image & operator=(const Image &image)=default
An image is assignable.
Definition: IAudio.hpp:12
Image(const std::string &filename, bool lonely=false)
Create an image, loading a file.
Definition: Image.cpp:22
Rectangle in a two-dimensional space.
Definition: Rectangle.hpp:17
Object representation of a framebuffer.
Definition: Image.hpp:20
~Image() override=default
Image destructor, will unload ressources.
std::string _ressourcePath
Definition: Image.hpp:61
void drawOn(RAY::Window &) override
Draw image on window.
Definition: Image.cpp:66
A templated class used to cache ressources, indexed with a string.
Definition: Cache.hpp:23
Abstraction of any two-dimensionnal drawable.
Definition: ADrawable2D.hpp:21
std::shared_ptr<::Image > _image
Image, really, that's just it...
Definition: Image.hpp:57
void resize(const RAY::Vector2 &dimensions)
Resize image;.
Definition: Image.cpp:60
Image & use(const std::string &filename)
Load image from file, lets one use one entity for multiple files.
Definition: Image.cpp:41