Load one big image and split it into smaller images so that you can display tiles or play an animation. More...
#include <SpriteSheet.hpp>
Public Member Functions | |
| SpriteSheet () | |
| Default constructor. More... | |
| SpriteSheet (const SpriteSheet ©) | |
| Copy constructor. More... | |
| SpriteSheet & | operator= (const SpriteSheet &right) |
| Overload of assignment operator. More... | |
| virtual void | setSize (float width, float height) |
| Changes the size of the picture cell, so the piece that is shown. More... | |
| virtual Vector2u | getSize () const |
| Returns the size of a picture cell, so the piece that is shown, unaffected by scaling. More... | |
| virtual Vector2f | getScaledSize () const |
| Returns the size of a picture cell, so the piece that is shown, after the scaling transformation. More... | |
| virtual void | setCells (unsigned int rows, unsigned int columns) |
| Change the number of rows and columns in the image. More... | |
| virtual void | setRows (unsigned int rows) |
| Change the number of rows in the image. More... | |
| virtual unsigned int | getRows () const |
| Returns the number of rows in the image. More... | |
| virtual void | setColumns (unsigned int columns) |
| Change the number of columns in the image. More... | |
| virtual unsigned int | getColumns () const |
| Returns the number of columns in the image. More... | |
| virtual void | setVisibleCell (unsigned int row, unsigned int column) |
| Choose which cell should be displayed. More... | |
| virtual sf::Vector2u | getVisibleCell () const |
| Returns which cell is being displayed. More... | |
Public Member Functions inherited from tgui::Picture | |
| Picture () | |
| Default constructor. More... | |
| Picture (const Picture ©) | |
| Copy constructor. More... | |
| virtual | ~Picture () |
| Destructor. More... | |
| Picture & | operator= (const Picture &right) |
| Overload of assignment operator. More... | |
| virtual bool | load (const std::string &filename) |
| Load an image from a file. More... | |
| virtual std::string | getLoadedFilename () const |
| Returns the filename that was used to load the picture. More... | |
Public Member Functions inherited from tgui::OBJECT | |
| OBJECT () | |
| Default constructor. More... | |
| OBJECT (const OBJECT ©) | |
| Copy constructor. More... | |
| virtual | ~OBJECT () |
| Destructor. More... | |
| OBJECT & | operator= (const OBJECT &right) |
| Overload of assignment operator. More... | |
| virtual void | show () |
| Shows the object. More... | |
| virtual void | hide () |
| Hides the object. More... | |
| virtual bool | isVisible () const |
| Returns true when the object is visible. More... | |
| virtual void | enable () |
| Enables the object. More... | |
| virtual void | disable () |
| Disables the object. More... | |
| virtual bool | isEnabled () const |
| Returns true when the object is enabled. More... | |
| virtual bool | isDisabled () const |
| Returns true when the object is disabled. More... | |
| virtual bool | isLoaded () const |
| Returns true when the object is loaded successfully. More... | |
| void | focus () |
| Focus the object. More... | |
| void | unfocus () |
| Unfocus the object. More... | |
| void | focusNextObject () |
| Focuses the next object. More... | |
| virtual bool | isFocused () const |
| Returns true when the object is focused and false otherwise. More... | |
| virtual ObjectTypes | getObjectType () const |
| Returns the type of the object. More... | |
| virtual void | moveToFront () |
| Places the object before all other objects. More... | |
| virtual void | moveToBack () |
| Places the object behind all other objects. More... | |
Load one big image and split it into smaller images so that you can display tiles or play an animation.
| tgui::SpriteSheet::SpriteSheet | ( | ) |
Default constructor.
| tgui::SpriteSheet::SpriteSheet | ( | const SpriteSheet & | copy | ) |
Copy constructor.
|
virtual |
Returns the number of columns in the image.
|
virtual |
Returns the number of rows in the image.
|
virtual |
Returns the size of a picture cell, so the piece that is shown, after the scaling transformation.
Reimplemented from tgui::Picture.
|
virtual |
Returns the size of a picture cell, so the piece that is shown, unaffected by scaling.
Reimplemented from tgui::Picture.
|
virtual |
Returns which cell is being displayed.
| SpriteSheet& tgui::SpriteSheet::operator= | ( | const SpriteSheet & | right | ) |
Overload of assignment operator.
|
virtual |
Change the number of rows and columns in the image.
|
virtual |
Change the number of columns in the image.
|
virtual |
Change the number of rows in the image.
|
virtual |
Changes the size of the picture cell, so the piece that is shown.
| width | The new width of the picture cell. |
| height | The new height of the picture cell. |
Reimplemented from tgui::Picture.
|
virtual |
Choose which cell should be displayed.
1.8.5