UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::graphic::SpritesheetData Class Reference

Container for an unoptimized FixedSpritesheet data. May freely add new frames. More...

#include <ugdk/graphic/spritesheet.h>

Classes

struct  SpritesheetFrame
 

Public Member Functions

 SpritesheetData (const std::string &filename)
 Creates a new FixedSpritesheetData from the given file.
 
 SpritesheetData (const std::list< std::string > &filenames)
 
 ~SpritesheetData ()
 
void AddFrame (int topleft_x, int topleft_y, int width, int height, const Vector2D &hotspot, size_t file=0)
 Adds a new frame to the frame list.
 
void FillWithFramesize (int width, int height, const Vector2D &hotspot, size_t file=0)
 Adds frames of equal size, all with the same hotspot.
 
void FillWithFramesizeFromAllFiles (int width, int height, const Vector2D &hotspot)
 Calls FillWithFramesize for all files.
 
const std::list
< SpritesheetFrame > & 
frames () const
 Getter for the frame data.
 

Detailed Description

Container for an unoptimized FixedSpritesheet data. May freely add new frames.

Constructor & Destructor Documentation

ugdk::graphic::SpritesheetData::SpritesheetData ( const std::string &  filename)

Creates a new FixedSpritesheetData from the given file.

ugdk::graphic::SpritesheetData::SpritesheetData ( const std::list< std::string > &  filenames)
ugdk::graphic::SpritesheetData::~SpritesheetData ( )

Member Function Documentation

void ugdk::graphic::SpritesheetData::AddFrame ( int  topleft_x,
int  topleft_y,
int  width,
int  height,
const Vector2D hotspot,
size_t  file = 0 
)

Adds a new frame to the frame list.

void ugdk::graphic::SpritesheetData::FillWithFramesize ( int  width,
int  height,
const Vector2D hotspot,
size_t  file = 0 
)

Adds frames of equal size, all with the same hotspot.

void ugdk::graphic::SpritesheetData::FillWithFramesizeFromAllFiles ( int  width,
int  height,
const Vector2D hotspot 
)

Calls FillWithFramesize for all files.

const std::list<SpritesheetFrame>& ugdk::graphic::SpritesheetData::frames ( ) const
inline

Getter for the frame data.


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