Bitmap management.
More...
Bitmap management.
◆ TLN_CreateBitmap()
TLN_Bitmap TLN_CreateBitmap |
( |
int |
width, |
|
|
int |
height, |
|
|
int |
bpp |
|
) |
| |
Creates a memory bitmap.
- Parameters
-
width | Width in pixels |
height | Height in pixels |
bpp | Bits per pixel |
- Returns
- Reference to the created bitmap, or NULL if error
- See also
- TLN_SetBGBitmap()
◆ TLN_LoadBitmap()
TLN_Bitmap TLN_LoadBitmap |
( |
const char * |
filename | ) |
|
Load image file (8-bit BMP or PNG)
- Parameters
-
filename | File name with the image |
- Returns
- Handler to the loaded image or NULL if error
- See also
- TLN_DeleteBitmap()
◆ TLN_CloneBitmap()
Creates a copy of a bitmap.
- Parameters
-
src | Reference to the original bitmap |
- Returns
- Reference to the created bitmap, or NULL if error
- See also
- TLN_SetBGBitmap()
◆ TLN_GetBitmapPtr()
uint8_t* TLN_GetBitmapPtr |
( |
TLN_Bitmap |
bitmap, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
Gets memory access for direct pixel manipulation.
- Parameters
-
bitmap | Reference to bitmap |
x | Starting x position [0, width - 1] |
y | Starting y position [0, height - 1] |
- Returns
- Pointer to pixel data starting at x,y
◆ TLN_GetBitmapWidth()
Returns the width in pixels.
- Parameters
-
bitmap | Reference to the bitmap |
◆ TLN_GetBitmapHeight()
Returns the height in pixels.
- Parameters
-
bitmap | Reference to the bitmap |
◆ TLN_GetBitmapDepth()
Returns the bits per pixel.
- Parameters
-
bitmap | Reference to the bitmap |
◆ TLN_GetBitmapPitch()
Returns the number of bytes per scaline (also known a stride)
- Parameters
-
bitmap | Reference to the bitmap |
◆ TLN_GetBitmapPalette()
Gets the associated palete of a bitmap.
- Parameters
-
bitmap | Reference to bitmap |
- Returns
- Reference to the bitmap palette
- See also
- TLN_SetBitmapPalette()
◆ TLN_SetBitmapPalette()
Assigns a new palette to the bitmap.
- Parameters
-
bitmap | Reference to the bitmap |
palette | Reference to the palette to assign |
- See also
- TLN_GetBitmapPalette()
◆ TLN_DeleteBitmap()
Deletes bitmap and frees resources.
- Parameters
-
bitmap | Reference to bitmap to delete |
- See also
- TLN_CreateBitmap89, TLN_CloneBitmap()