38 lines
933 B
C
38 lines
933 B
C
#ifndef FE_MODEL_BITMAP
|
|
#define FE_MODEL_BITMAP
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
/* bitmap model
|
|
transparency is in the layout
|
|
this color type is monochrome only ! */
|
|
typedef struct fe_bitmap
|
|
{
|
|
uint32_t size_px_x;
|
|
uint32_t size_px_y;
|
|
uint32_t size_o_y;
|
|
|
|
uint32_t * color;
|
|
bool color_dynamic;
|
|
uint32_t * layout;
|
|
bool layout_dynamic;
|
|
} fe_bitmap;
|
|
|
|
|
|
fe_bitmap* fe_bitmap_new(uint32_t size_px_x, uint32_t size_px_y, uint32_t* color, bool copy_color, uint32_t *layout, bool copy_layout);
|
|
|
|
void fe_bitmap_del(fe_bitmap * bmp);
|
|
|
|
|
|
/* fe_bitmap_get_pixel()
|
|
returns the color of a pixel in the gint's type*/
|
|
uint8_t fe_bitmap_get_px(const fe_bitmap * bmp, uint32_t x, uint32_t y);
|
|
|
|
|
|
/* fe_bitmap_display_pixel()
|
|
display a specific rich bitmap pixel on the screen (on vram) */
|
|
void fe_bitmap_display_px(const fe_bitmap * bmp, uint32_t bmp_x, uint32_t bmp_y, uint32_t scr_x, uint32_t scr_y);
|
|
|
|
#endif
|