List of all members
clan::Image Class Reference
clanDisplay 2D

Image class. More...

`#include <image.h>`

## Public Member Functions
Construction
| Image ()
| Constructs a null instance. More...
| Image (Texture2D texture, const Rect &rect)
| Constructs an image from a texture. More...
| Image (Subtexture &sub_texture)
| Constructs an image from a subtexture. More...
| Image (Canvas &canvas, const PixelBuffer &pixelbuffer, const Rect &rect)
| Constructs a Image from a pixelbuffer. More...
| Image (Canvas &canvas, const std::string &filename, const ImageImportDescription &import_desc=ImageImportDescription())
| Constructs a Image. More...
| Image (Canvas &canvas, const std::string &filename, const FileSystem &fs, const ImageImportDescription &import_desc=ImageImportDescription())
| Constructs a Image. More...
virtual | ~Image ()
Attributes
bool | is_null () const
| Returns true if this object is invalid. More...
void | throw_if_null () const
| Throw an exception if this object is invalid. More...
float | get_scale_x () const
| Returns x scale. More...
float | get_scale_y () const
| Returns y scale. More...
float | get_alpha () const
| Returns current alpha. More...
Colorf | get_color () const
| Returns current color. More...
void | get_alignment (Origin &origin, float &x, float &y) const
| Returns translation hot-spot. More...
Subtexture | get_texture () const
| Return the texture of the image. More...
Sizef | get_size () const
| Return the size of the image. More...
float | get_width () const
| Return the width of the image. More...
float | get_height () const
| Return the height of the image. More...
Operators
bool | operator== (const Image &other) const
| Equality operator. More...
bool | operator!= (const Image &other) const
| Inequality operator. More...
bool | operator< (const Image &other) const
| Less than operator. More...
Operations
Image | clone () const
| Copies all information from this image to another, excluding the graphics that remain shared. More...
void | draw (Canvas &canvas, float x, float y) const
| Draw image on graphic context. More...
void | draw (Canvas &canvas, const Rectf &src, const Rectf &dest) const
| Draw image on graphic context. More...
void | draw (Canvas &canvas, const Rectf &dest) const
| Draw image on graphic context. More...
void | draw (Canvas &canvas, const Rectf &src, const Quadf &dest) const
| Draw image on graphic context. More...
void | draw (Canvas &canvas, const Quadf &dest) const
| Draw image on graphic context. More...
void | set_scale (float x, float y)
| Set scale for x and y directions individually. More...
void | set_alpha (float alpha)
| Sets transparency. More...
void | set_color (const Colorf &color)
| Sets the color. More...
void | set_color (const Color &c)
| Set color. More...
void | set_alignment (Origin origin, float x=0, float y=0)
| Sets translation hotspot. More...
void | set_wrap_mode (TextureWrapMode wrap_s, TextureWrapMode wrap_t)
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 filter should be used. More...

## Static Public Member Functions
Resources
static Resource< Image > | resource (Canvas &canvas, const std::string &id, const ResourceManager &resources)
| Retrieves a Sprite resource from the resource manager. More...
static Image | load (Canvas &canvas, const std::string &id, const XMLResourceDocument &doc)
| Loads a Sprite from a XML resource definition. More...

## Detailed Description

Image class.

The documentation for this class was generated from the following file:

- image.h