|
Muteki
EABI code execution on Besta® RTOS devices.
|
Surface API. More...
#include "types/surface.h"Go to the source code of this file.
Functions | |
| size_t | SizeofGraphic (lcd_surface_t *surface) |
| Calculate the total on-memory size of a surface (including descriptor). | |
| lcd_surface_t * | InitGraphic (lcd_surface_t *surface, short width, short height, short depth) |
| Initialize a buffer as an all-in-one surface. | |
| void | _BitBlt (lcd_surface_t *dst, short xdstoffset, short ydstoffset, short xsize, short ysize, lcd_surface_t *src, int xsrcoffset, int ysrcoffset, unsigned short flags) |
| Perform blit operation from src surface to dst surface. | |
| size_t | GetImageSize (short width, short height) |
| Calculate the buffer size required for an all-in-one surface of a specific size. | |
| size_t | GetImageSizeExt (short width, short height, short depth) |
| Calculate the buffer size required for an all-in-one surface of a specific pixel format and size. | |
| void * | ImageData (lcd_surface_t *surface) |
| Get the palette and bitmap buffer for an all-in-one surface. | |
| size_t | SizeofImage (lcd_surface_t *surface) |
| Get the total on-memory size of a surface, in bytes. | |
| void | FreeImage (lcd_surface_t *surface) |
| Dispose an all-in-one surface. | |
Surface API.
|
extern |
Perform blit operation from src surface to dst surface.
This copies a rectangle of size (xsize, ysize) px on the src surface, with its the top left corner located at (xsrcoffset, ysrcoffset) px, to the dst surface. The top left corner of that rectangle will be aligned to a point on the dst surface at (xdstoffset, ydstoffset) px. Optionally one can specify one or more processing flags to let the blitter perform certain pixel operations on-the-fly.
| dst | Destination surface. |
| xdstoffset | X coordinate of the destination surface that align with the top left corner of the blitted image, in pixels. |
| ydstoffset | Y coordinate of the destination surface that align with the top left corner of the blitted image, in pixels. |
| xsize | Number of pixel columns to copy. |
| ysize | Number of pixel rows to copy. |
| src | Source surface. |
| xsrcoffset | X coordinate of the source surface that align with the top left corner of the blitted image, in pixels. |
| ysrcoffset | Y coordinate of the source surface that align with the top left corner of the blitted image, in pixels. |
| flags | Process flags. |
|
extern |
Dispose an all-in-one surface.
This is simply a wrapper around _lfree().
| surface | The surface descriptor. |
|
extern |
Calculate the buffer size required for an all-in-one surface of a specific size.
This assumes the surface will be in the same format as the surface linked to the current active LCD.
| width | The width of the desired surface. |
| height | The height of the desired surface. |
|
extern |
Calculate the buffer size required for an all-in-one surface of a specific pixel format and size.
This is similar to GetImageSize() but it allows arbitrary pixel bit depth.
| width | The width of the desired surface. |
| height | The height of the desired surface. |
| depth | The pixel bit depth of the desired surface. |
|
extern |
Get the palette and bitmap buffer for an all-in-one surface.
| surface | The surface descriptor. |
|
extern |
Initialize a buffer as an all-in-one surface.
If a palette is required (depth is 8-bit or less), the palette is assumed to follow the descriptor immediately, then the pixel buffer is assumed to start immediately after the palette. Otherwise the pixel buffer is assumed to follow the descriptor immediately (i.e. palette size is 0) and lcd_surface_t::palette will be set to NULL.
| surface | A buffer that will hold the data. |
| width | Width of the surface in pixels. |
| height | Height of the surface in pixels. |
| depth | The pixel bit depth. |
|
extern |
Calculate the total on-memory size of a surface (including descriptor).
| surface | The surface descriptor. |
|
extern |
Get the total on-memory size of a surface, in bytes.
This is equivalent to
| surface | Pointer to the surface descriptor. |