ManaPlus
|
#include <subimage.h>
Public Member Functions | |
SubImage (Image *const parent, SDL_Surface *const image, const int x, const int y, const int width, const int height) | |
SubImage (Image *const parent, const GLuint image, const int x, const int y, const int width, const int height, const int texWidth, const int textHeight) | |
~SubImage () | |
Image * | getSubImage (const int x, const int y, const int width, const int height) |
ImageTypeT | getType () const |
int | calcMemoryLocal () const |
void | decRef () |
Data Fields | |
SDL_Rect | mInternalBounds |
Private Attributes | |
Image * | mParent |
A clipped version of a larger image.
Definition at line 34 of file subimage.h.
SubImage::SubImage | ( | Image *const | parent, |
SDL_Surface *const | image, | ||
const int | x, | ||
const int | y, | ||
const int | width, | ||
const int | height | ||
) |
Constructor.
Definition at line 90 of file subimage.cpp.
References CAST_S16, CAST_U16, Logger::log(), logger, mInternalBounds, mParent, x, and y.
Referenced by calcMemoryLocal().
SubImage::SubImage | ( | Image *const | parent, |
const GLuint | image, | ||
const int | x, | ||
const int | y, | ||
const int | width, | ||
const int | height, | ||
const int | texWidth, | ||
const int | textHeight | ||
) |
Definition at line 144 of file subimage.cpp.
References CAST_S16, CAST_U16, Logger::log(), logger, mInternalBounds, mParent, x, and y.
SubImage::~SubImage | ( | ) |
Destructor.
Definition at line 187 of file subimage.cpp.
References Logger::log(), logger, and mParent.
int SubImage::calcMemoryLocal | ( | ) | const |
Definition at line 231 of file subimage.cpp.
References ResourceManager::calcMemoryLocal(), and SubImage().
void SubImage::decRef | ( | ) |
Image * SubImage::getSubImage | ( | const int | x, |
const int | y, | ||
const int | width, | ||
const int | height | ||
) |
Creates a new image with the desired clipping rectangle.
NULL
if creation failed and a valid image otherwise. Definition at line 216 of file subimage.cpp.
|
inline |
SDL_Rect SubImage::mInternalBounds |
Definition at line 79 of file subimage.h.
Referenced by Map::reduce(), and SubImage().
|
private |
Definition at line 82 of file subimage.h.
Referenced by getSubImage(), SubImage(), and ~SubImage().