33 #include "../../Core/Math/origin.h" 34 #include "../../Core/Resources/resource.h" 36 #include "../Image/image_import_description.h" 37 #include "../Render/texture.h" 53 class ResourceManager;
54 class XMLResourceDocument;
165 return impl==other.impl;
171 return impl!=other.impl;
177 return impl < other.impl;
204 const Rectf &dest)
const;
212 const Rectf &dest)
const;
222 const Quadf &dest)
const;
230 const Quadf &dest)
const;
264 std::shared_ptr<Image_Impl> impl;
Floating point color description class (for float).
Definition: color.h:660
Sub-texture description.
Definition: subtexture.h:45
Resource proxy of a specific type.
Definition: resource.h:58
void set_color(const Colorf &color)
Sets the color.
void get_alignment(Origin &origin, float &x, float &y) const
Returns translation hot-spot.
2D Graphics Canvas
Definition: canvas.h:72
TextureWrapMode
Texture coordinate wrapping modes.
Definition: texture.h:65
void set_color(const Color &c)
Set color.
Definition: image.h:247
Sizef get_size() const
Return the size of the image.
bool operator!=(const Image &other) const
Inequality operator.
Definition: image.h:169
Pixel data container.
Definition: pixel_buffer.h:68
Origin
Alignment origins.
Definition: origin.h:40
Image Import Description Class.
Definition: image_import_description.h:48
float get_height() const
Return the height of the image.
static Image load(Canvas &canvas, const std::string &id, const XMLResourceDocument &doc)
Loads a Sprite from a XML resource definition.
void set_linear_filter(bool linear_filter=true)
Set to true if a linear filter should be used for scaling up and down, false if a nearest-point filte...
void draw(Canvas &canvas, float x, float y) const
Draw image on graphic context.
bool operator<(const Image &other) const
Less than operator.
Definition: image.h:175
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:470
Subtexture get_texture() const
Return the texture of the image.
2D texture object class.
Definition: texture_2d.h:41
Image()
Constructs a null instance.
2D (left,top,right,bottom) rectangle structure - Float
Definition: rect.h:484
2D quad structure - Float
Definition: quad.h:212
Virtual File System (VFS).
Definition: file_system.h:47
Resource manager.
Definition: resource_manager.h:44
Colorf get_color() const
Returns current color.
float get_alpha() const
Returns current alpha.
float get_scale_x() const
Returns x scale.
Image class.
Definition: image.h:59
void set_wrap_mode(TextureWrapMode wrap_s, TextureWrapMode wrap_t)
static Resource< Image > resource(Canvas &canvas, const std::string &id, const ResourceManager &resources)
Retrieves a Sprite resource from the resource manager.
bool operator==(const Image &other) const
Equality operator.
Definition: image.h:163
void set_scale(float x, float y)
Set scale for x and y directions individually.
Image clone() const
Copies all information from this image to another, excluding the graphics that remain shared...
void throw_if_null() const
Throw an exception if this object is invalid.
XML Resource Document.
Definition: xml_resource_document.h:48
float get_scale_y() const
Returns y scale.
float get_width() const
Return the width of the image.
bool is_null() const
Returns true if this object is invalid.
Definition: image.h:122
void set_alpha(float alpha)
Sets transparency.
Color description class.
Definition: color.h:46
void set_alignment(Origin origin, float x=0, float y=0)
Sets translation hotspot.
2D (width,height) size structure - Float
Definition: size.h:169