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 | |
![]() | |
~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. | |
![]() | |
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 | |
![]() | |
enum | OrphanPolicy { DeleteLater , DeleteImmediately } |
![]() | |
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) |
![]() | |
Image (SDL_Texture *texture, int width, int height) | |
SDL Constructor. | |
![]() | |
virtual | ~Resource ()=default |
![]() | |
static Image * | _SDLload (SDL_Surface *tmpImage) |
SDL_Surface to SDL_Texture Image loader. | |
![]() | |
SDL_Rect | mBounds |
float | mAlpha = 1.0f |
SDL_Texture * | mTexture = nullptr |
![]() | |
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 |