Stored image.
More...
#include <th_gfx_sdl.h>
|
| | raw_bitmap ()=default |
| |
| | ~raw_bitmap () |
| |
| void | set_palette (const ::palette *pPalette) |
| | Set the palette of the image.
|
| |
| void | load_from_th_file (const uint8_t *pPixelData, size_t iPixelDataLength, int iWidth, render_target *pEventualCanvas, uint32_t spriteFlags) |
| | Load the image from the supplied pixel data.
|
| |
| void | draw (render_target *pCanvas, int iX, int iY) |
| | Draw the image at a given position at the given canvas.
|
| |
| void | draw (render_target *pCanvas, int iX, int iY, int iSrcX, int iSrcY, int iWidth, int iHeight) |
| | Draw part of the image at a given position at the given canvas.
|
| |
◆ raw_bitmap()
| raw_bitmap::raw_bitmap |
( |
| ) |
|
|
default |
◆ ~raw_bitmap()
| raw_bitmap::~raw_bitmap |
( |
| ) |
|
◆ draw() [1/2]
Draw the image at a given position at the given canvas.
- Parameters
-
| pCanvas | Canvas to draw at. |
| iX | Destination x position. |
| iY | Destination y position. |
◆ draw() [2/2]
Draw part of the image at a given position at the given canvas.
- Parameters
-
| pCanvas | Canvas to draw at. |
| iX | Destination x position. |
| iY | Destination y position. |
| iSrcX | X position of the part to display. |
| iSrcY | Y position of the part to display. |
| iWidth | Width of the part to display. |
| iHeight | Height of the part to display. |
◆ load_from_th_file()
| void raw_bitmap::load_from_th_file |
( |
const uint8_t * |
pPixelData, |
|
|
size_t |
iPixelDataLength, |
|
|
int |
iWidth, |
|
|
render_target * |
pEventualCanvas, |
|
|
uint32_t |
spriteFlags |
|
) |
| |
Load the image from the supplied pixel data.
Loader uses the palette supplied before.
- Parameters
-
| pPixelData | Image data loaded from a TH file. |
| iPixelDataLength | Size of the loaded image data. |
| iWidth | Width of the image. |
| pEventualCanvas | Canvas to render the image to (eventually). |
| spriteFlags | |
- Returns
- Loading was a success.
◆ set_palette()
Set the palette of the image.
- Parameters
-
| pPalette | Palette to set for this image. |
The documentation for this class was generated from the following files: