21 #ifndef HX3D_GRAPHICS_IMAGE 22 #define HX3D_GRAPHICS_IMAGE 24 #include "hx3d/graphics/color.hpp" 26 #include "hx3d/utils/ptr.hpp" 51 Image(
unsigned int width,
unsigned int height);
60 void create(
unsigned int width,
unsigned int height);
69 void set(
unsigned int x,
unsigned int y,
Color color);
80 void setRect(
unsigned int x,
unsigned int y,
unsigned int w,
unsigned int h,
Color color);
90 Color get(
unsigned int x,
unsigned int y);
126 void updateTextureZone(
unsigned int x,
unsigned int y,
unsigned int w,
unsigned int h);
134 unsigned int _height;
136 unsigned char* _buffer;
void setRect(unsigned int x, unsigned int y, unsigned int w, unsigned int h, Color color)
Set a rectangle with a color.
Four [0..255] components defined color.
unsigned int getHeight()
Get the image height.
void buildTexture()
Recreate a texture from the image.
void updateTextureZone(unsigned int x, unsigned int y, unsigned int w, unsigned int h)
Update an existing texture zone.
unsigned int getWidth()
Get the image width.
Ptr< Texture > getTexture()
Get the texture.
Real-time editable texture.
void create(unsigned int width, unsigned int height)
Initialize an image.
2D/3D texture management.
Image()
Construct an empty image. Use create to create the image.
std::shared_ptr< T > Ptr
Quick-typing shared ptr.