29#ifndef NOMLIB_GRAPHICS_SPRITE_SPRITE_SHEET_HPP
30#define NOMLIB_GRAPHICS_SPRITE_SPRITE_SHEET_HPP
36#include "nomlib/config.hpp"
37#include "nomlib/version.hpp"
38#include "nomlib/math/Rect.hpp"
39#include "nomlib/ptree.hpp"
126 bool insert_frame(nom::size_type frame_num,
const IntRect& frame_bounds);
127 bool append_frame(
const IntRect& frame_bounds);
int sheet_height_
Source sheet_height used is saved with the output (meta-data).
std::map< int, IntRect > sheet_
Sprite sheet container.
int sheet_padding_
Source padding used is saved with the output (meta-data).
int sheet_width_
Source sheet_width used is saved with the output (meta-data).
bool empty() const
Obtain whether the sprite sheet is empty or not.
bool load_file(const std::string &filename)
De-serialize an existing JSON file.
std::string version() const
Get the current version of the sprite sheet file format.
int total_frames_
The total number of sprite frames; as per the number of objects in the frames object node.
~SpriteSheet()
Destructor.
std::string sheet_filename_
Source filename used is saved with the output (meta-data).
int sheet_height() const
Get the total sprite sheet height.
const IntRect & dimensions(int index) const
Get the calculations made for a particular ID number.
const std::string & sheet_filename() const
Get the sprite sheet's filename.
int total_frames() const
Get the total number of sprite frames.
int sheet_spacing_
Source spacing used is saved with the output (meta-data).
bool remove_frame(nom::size_type frame)
Erase an existing frame from the sheet.
bool load_sheet_object(const Value &object)
Load a sprite sheet from a de-serialized object.
int sheet_width() const
Get the total sprite sheet width.
int sheet_padding() const
Get the sprite sheet's padding.
int frames() const
Obtain the number of frames this object contains.
SpriteSheet * clone() const
Make a duplicate of this object's instance.
void dump() const
Dump the state of this object instance.
int sheet_spacing() const
Get the sprite sheet's spacing.
void remove_frames()
Destroy all stored sprite frames.
Generic interface for opaque data containers.
Container for x.x.x version schemes.