|
corona
1.0.2
|
#include <SimpleImage.h>


Public Member Functions | |
| SimpleImage (int width, int height, PixelFormat format, byte *pixels, byte *palette=0, int palette_size=0, PixelFormat palette_format=PF_DONTCARE) | |
| ~SimpleImage () | |
| int COR_CALL | getWidth () |
| int COR_CALL | getHeight () |
| PixelFormat COR_CALL | getFormat () |
| void *COR_CALL | getPixels () |
| void *COR_CALL | getPalette () |
| int COR_CALL | getPaletteSize () |
| PixelFormat COR_CALL | getPaletteFormat () |
Basic, flat, simple image. Has a width, a height, a pixel format, and a 2D array of pixels (one-byte packing).
The constructor takes a pixel buffer (and optionally a palette) which it then owns and delete[]'s when the image is destroyed.
Definition at line 19 of file SimpleImage.h.
| corona::SimpleImage::SimpleImage | ( | int | width, |
| int | height, | ||
| PixelFormat | format, | ||
| byte * | pixels, | ||
| byte * | palette = 0, |
||
| int | palette_size = 0, |
||
| PixelFormat | palette_format = PF_DONTCARE |
||
| ) | [inline] |
Creates a new image, setting all properties.
| width | width of the new image |
| height | height of the new image |
| format | format that the pixels are stored in |
| pixels | pixel buffer that the SimpleImage takes ownership of. it should be width*height*sizeof(pixel) bytes. |
| palette | palette color buffer |
| palette_size | number of entries in palette |
| palette_format | color format palette is stored as |
Definition at line 35 of file SimpleImage.h.
| corona::SimpleImage::~SimpleImage | ( | ) | [inline] |
Destroys the image, freeing the owned pixel buffer and palette.
Definition at line 55 of file SimpleImage.h.
| int COR_CALL corona::SimpleImage::getWidth | ( | ) | [inline, virtual] |
Get image width.
Implements corona::Image.
Definition at line 60 of file SimpleImage.h.
| int COR_CALL corona::SimpleImage::getHeight | ( | ) | [inline, virtual] |
Get image height.
Implements corona::Image.
Definition at line 64 of file SimpleImage.h.
| PixelFormat COR_CALL corona::SimpleImage::getFormat | ( | ) | [inline, virtual] |
Get pixel format.
Implements corona::Image.
Definition at line 68 of file SimpleImage.h.
| void* COR_CALL corona::SimpleImage::getPixels | ( | ) | [inline, virtual] |
Get pixel buffer. The pixels are packed in the format defined by the image's pixel format.
Implements corona::Image.
Definition at line 72 of file SimpleImage.h.
| void* COR_CALL corona::SimpleImage::getPalette | ( | ) | [inline, virtual] |
Get the palette. Pixels are packed in the format defined by getPaletteFormat().
Implements corona::Image.
Definition at line 76 of file SimpleImage.h.
| int COR_CALL corona::SimpleImage::getPaletteSize | ( | ) | [inline, virtual] |
Get the number of entries in the palette.
Implements corona::Image.
Definition at line 80 of file SimpleImage.h.
| PixelFormat COR_CALL corona::SimpleImage::getPaletteFormat | ( | ) | [inline, virtual] |
Get the format of the colors in the palette.
Implements corona::Image.
Definition at line 84 of file SimpleImage.h.
1.7.6.1