#include <SimpleImage.h>
Inheritance diagram for corona::SimpleImage:
Public Methods | |
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 () |
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 18 of file SimpleImage.h.
|
Creates a new image, setting all properties.
Definition at line 34 of file SimpleImage.h. |
|
Destroys the image, freeing the owned pixel buffer and palette. Definition at line 54 of file SimpleImage.h. |
|
Get image width.
Implements corona::Image. Definition at line 59 of file SimpleImage.h. References COR_CALL. |
|
Get image height.
Implements corona::Image. Definition at line 63 of file SimpleImage.h. References COR_CALL. |
|
Get pixel format.
Implements corona::Image. Definition at line 67 of file SimpleImage.h. References COR_CALL, and corona::PixelFormat. |
|
Get pixel buffer. The pixels are packed in the format defined by the image's pixel format.
Implements corona::Image. Definition at line 71 of file SimpleImage.h. References COR_CALL. |
|
Get the palette. Pixels are packed in the format defined by getPaletteFormat().
Implements corona::Image. Definition at line 75 of file SimpleImage.h. References COR_CALL. |
|
Get the number of entries in the palette.
Implements corona::Image. Definition at line 79 of file SimpleImage.h. References COR_CALL. |
|
Get the format of the colors in the palette.
Implements corona::Image. Definition at line 83 of file SimpleImage.h. References COR_CALL, and corona::PixelFormat. |