33 #ifndef DIMAGE_H_INCLUDED
34 #define DIMAGE_H_INCLUDED
37 #include <Dynacoe/Color.h>
38 #include <Dynacoe/Util/Vector.h>
39 #include <Dynacoe/Modules/Assets.h>
74 Frame(
int textureObjectHandle);
78 Frame(uint32_t w, uint32_t h);
82 Frame(uint32_t w, uint32_t h,
const std::vector<uint8_t> & data);
93 std::vector<uint8_t>
GetData()
const;
98 void SetData(
const std::vector<uint8_t> & data);
102 uint32_t
Width()
const;
111 std::vector<Frame>
Detilize(uint32_t smallWidth, uint32_t smallHeight)
const;
130 Image(
const std::string &);
int GetHandle() const
Returns the object handle to be used with the Renderer.
Frame()
Creates an empty Frame.
Frame & CurrentFrame()
Currently active frame. Changes over time.
A 2D matrix of pixels.
Definition: Image.h:68
std::vector< uint8_t > GetData() const
Returns the raw pixel data of a frame.
Class for abstracting visual data blocks.
Definition: Image.h:62
void SetData(const std::vector< uint8_t > &data)
Updates a frame with the given pixel data. Note that the data must match in dimensions the current Wi...
std::vector< Frame > frames
The frames of the Image.
Definition: Image.h:122
uint32_t Height() const
Returns the height of the frame.
std::vector< Frame > Detilize(uint32_t smallWidth, uint32_t smallHeight) const
Splits the frame into many sub-frames, each with the specified smallWidth and smallHeight.
uint32_t Width() const
Returns the width of the frame.