Mana
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Tileset Class Reference

A tileset, which is basically just an image set but it stores a firstgid. More...

#include <tileset.h>

Inheritance diagram for Tileset:
ImageSet Resource

Public Member Functions

 Tileset (Image *img, int w, int h, unsigned firstGid, int margin, int spacing)
 
unsigned getFirstGid () const
 Returns the first gid.
 
- Public Member Functions inherited from ImageSet
 ImageSet (Image *img, int w, int h, int margin=0, int spacing=0)
 Cuts the passed image in a grid of sub images.
 
 ImageSet (const ImageSet &)=delete
 
ImageSetoperator= (const ImageSet &)=delete
 
 ~ImageSet () override
 
int getWidth () const
 Returns the width of the images in the image set.
 
int getHeight () const
 Returns the height of the images in the image set.
 
Imageget (size_t i) const
 
size_t size () const
 
int getOffsetX () const
 
void setOffsetX (int n)
 
int getOffsetY () const
 
void setOffsetY (int n)
 
- 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

unsigned mFirstGid
 

Additional Inherited Members

- Public Types inherited from Resource
enum  OrphanPolicy { DeleteLater , DeleteImmediately }
 
- Protected Member Functions inherited from Resource
virtual ~Resource ()=default
 

Detailed Description

A tileset, which is basically just an image set but it stores a firstgid.

Definition at line 29 of file tileset.h.

Constructor & Destructor Documentation

◆ Tileset()

Tileset::Tileset ( Image img,
int  w,
int  h,
unsigned  firstGid,
int  margin,
int  spacing 
)
inline

Definition at line 32 of file tileset.h.

Member Function Documentation

◆ getFirstGid()

unsigned Tileset::getFirstGid ( ) const
inline

Returns the first gid.

Definition at line 42 of file tileset.h.

Member Data Documentation

◆ mFirstGid

unsigned Tileset::mFirstGid
private

Definition at line 48 of file tileset.h.


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