|
Mana
|
A clipped version of a larger image. More...
#include <image.h>
Public Member Functions | |
| SubImage (Image *parent, SDL_Texture *texture, int x, int y, int width, int height) | |
| ~SubImage () override | |
Public Member Functions inherited from Image | |
| ~Image () override | |
| int | getWidth () const |
| Returns the width of the image. | |
| int | getHeight () const |
| Returns the height of the image. | |
| void | setAlpha (float alpha) |
| Sets the alpha value of this image. | |
| float | getAlpha () const |
| Returns the alpha value of this image. | |
| Image * | getSubImage (int x, int y, int width, int height) |
| Creates a new image with the desired clipping rectangle. | |
Public Member Functions inherited from Resource | |
| Resource ()=default | |
| void | incRef () |
| Increments the internal reference count. | |
| void | decRef (OrphanPolicy orphanPolicy=DeleteLater) |
| Decrements the reference count. | |
| const std::string & | getIdPath () const |
| Return the path identifying this resource. | |
Private Attributes | |
| ResourceRef< Image > | mParent |
Additional Inherited Members | |
Public Types inherited from Resource | |
| enum | OrphanPolicy { DeleteLater , DeleteImmediately } |
Static Public Member Functions inherited from Image | |
| static Resource * | load (SDL_RWops *rw) |
| Loads an image from an SDL_RWops structure. | |
| static Resource * | load (SDL_RWops *rw, const Dye &dye) |
| Loads an image from an SDL_RWops structure and recolors it. | |
| static Image * | load (SDL_Surface *) |
| Loads an image from an SDL surface. | |
| static bool | useOpenGL () |
| Tells if the system is using OpenGL or SDL. | |
| static void | SDLdisableTransparency () |
| Disable the transparency handling (for low CPUs in SDL Mode) | |
| static bool | SDLisTransparencyDisabled () |
| static void | setRenderer (SDL_Renderer *renderer) |
Protected Member Functions inherited from Image | |
| Image (SDL_Texture *texture, int width, int height) | |
| SDL Constructor. | |
Protected Member Functions inherited from Resource | |
| virtual | ~Resource ()=default |
Static Protected Member Functions inherited from Image | |
| static Image * | _SDLload (SDL_Surface *tmpImage) |
| SDL_Surface to SDL_Texture Image loader. | |
Protected Attributes inherited from Image | |
| SDL_Rect | mBounds |
| float | mAlpha = 1.0f |
| SDL_Texture * | mTexture = nullptr |
Static Protected Attributes inherited from Image | |
| static bool | mDisableTransparency = false |
| Stores whether the transparency is disabled. | |
| static SDL_Renderer * | mRenderer |
| SubImage::SubImage | ( | Image * | parent, |
| SDL_Texture * | texture, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height | ||
| ) |
|
private |