ManaPlus
|
#include <imageset.h>
Public Types | |
typedef std::vector< Image * >::size_type | size_type |
Public Member Functions | |
ImageSet (Image *const img, const int w, const int h, const int margin, const int spacing) | |
~ImageSet () | |
int | getWidth () const |
int | getHeight () const |
Image * | get (const size_type i) const |
size_type | size () const |
int | getOffsetX () const |
void | setOffsetX (const int n) |
int | getOffsetY () const |
void | setOffsetY (const int n) |
const std::vector< Image * > & | getImages () const |
int | calcMemoryLocal () const |
Public Member Functions inherited from Resource | |
Resource () | |
~Resource () | |
virtual void | incRef () |
virtual void | decRef () |
int | calcMemoryLocal () const |
std::string | getCounterName () const |
Public Member Functions inherited from MemoryCounter | |
MemoryCounter () | |
virtual | ~MemoryCounter () |
int | calcMemory (const int level) const |
virtual int | calcMemoryChilds (const int level) const |
Private Attributes | |
std::vector< Image * > | mImages |
int | mWidth |
int | mHeight |
int | mOffsetX |
int | mOffsetY |
Additional Inherited Members | |
Data Fields inherited from Resource | |
time_t | mTimeStamp |
std::string | mIdPath |
std::string | mSource |
unsigned int | mRefCount |
bool | mProtected |
bool | mNotCount |
Stores a set of subimages originating from a single image.
Definition at line 38 of file imageset.h.
typedef std::vector<Image*>::size_type ImageSet::size_type |
Definition at line 69 of file imageset.h.
ImageSet::ImageSet | ( | Image *const | img, |
const int | w, | ||
const int | h, | ||
const int | margin, | ||
const int | spacing | ||
) |
Cuts the passed image in a grid of sub images.
Definition at line 35 of file imageset.cpp.
Referenced by calcMemoryLocal().
ImageSet::~ImageSet | ( | ) |
|
virtual |
Reimplemented from MemoryCounter.
Reimplemented in Tileset.
Definition at line 78 of file imageset.cpp.
References Resource::calcMemoryLocal(), ParticleType::Image, ImageSet(), and mImages.
Referenced by Tileset::calcMemoryLocal().
Definition at line 67 of file imageset.cpp.
References CAST_S32, Logger::log(), logger, and mImages.
Referenced by EquipmentWindow::addBox(), WindowMenu::addButton(), SpriteDef::addSequence(), BrowserBox::calcHeight(), Gui::draw(), SimpleAnimation::initializeAnimation(), SpriteDef::loadAnimation(), Button::loadImageSet(), EquipmentWindow::loadSlot(), ParticleEmitter::ParticleEmitter(), EmoteWindow::postInit(), ProgressIndicator::ProgressIndicator(), MapReader::readTileset(), setTile(), and StaticBrowserBox::updateHeight().
|
inline |
Returns the height of the images in the image set.
Definition at line 66 of file imageset.h.
References mHeight.
Referenced by SimpleAnimation::initializeAnimation(), SpriteDef::loadAnimation(), and ParticleEmitter::ParticleEmitter().
|
inline |
Definition at line 88 of file imageset.h.
References mImages.
Referenced by EmotePage::draw(), and EmotePage::safeDraw().
|
inline |
Definition at line 76 of file imageset.h.
References mOffsetX.
Referenced by SpriteDef::loadAnimation().
|
inline |
Definition at line 82 of file imageset.h.
References mOffsetY.
Referenced by SpriteDef::loadAnimation().
|
inline |
Returns the width of the images in the image set.
Definition at line 60 of file imageset.h.
References mWidth.
Referenced by SimpleAnimation::initializeAnimation(), SpriteDef::loadAnimation(), and ParticleEmitter::ParticleEmitter().
|
inline |
Definition at line 79 of file imageset.h.
References mOffsetX.
Referenced by SpriteDef::loadImageSet().
|
inline |
Definition at line 85 of file imageset.h.
References mOffsetY.
Referenced by SpriteDef::loadImageSet().
|
inline |
Definition at line 73 of file imageset.h.
References mImages.
Referenced by EquipmentWindow::addBox(), BrowserBox::calcHeight(), EmotePage::getIndexFromGrid(), EquipmentWindow::loadSlot(), EmoteWindow::postInit(), ProgressIndicator::ProgressIndicator(), and StaticBrowserBox::updateHeight().
|
private |
Height of the images in the image set.
Definition at line 97 of file imageset.h.
Referenced by getHeight().
|
private |
Definition at line 94 of file imageset.h.
Referenced by calcMemoryLocal(), get(), getImages(), ImageSet(), size(), and ~ImageSet().
|
private |
Definition at line 98 of file imageset.h.
Referenced by getOffsetX(), and setOffsetX().
|
private |
Definition at line 99 of file imageset.h.
Referenced by getOffsetY(), and setOffsetY().
|
private |
Width of the images in the image set.
Definition at line 96 of file imageset.h.
Referenced by getWidth().