add the last functions in the bmp doc, and remove old comments in bitmap header

This commit is contained in:
Milang 2019-10-23 15:41:07 +02:00
parent 25534c69af
commit 501a36ec69
2 changed files with 6 additions and 17 deletions

View File

@ -20,30 +20,18 @@ typedef struct fe_bitmap
} fe_bitmap;
/* fe_bitmap_new()
creates a new bitmap in the ram
with this function, the bmp is dynamic only, but there is still a way tou create it staticly :
you create a dynamic bmp
you create a static bmp <fe_bitmap bmp;>
you do a memcpy*/
fe_bitmap* fe_bitmap_new(
uint32_t size_px_x, uint32_t size_px_y, // bitmap size
uint32_t* color, bool copy_color, // color table address and type (static | dynamic)
uint32_t *layout, bool copy_layout // layout table address and type (static | dynamic)
);
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);
/* fe_bitmap_del()
deletes the bitmap from the ram */
void fe_bitmap_del(fe_bitmap * txtr);
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_pixel(const fe_bitmap * txtr, uint32_t x, uint32_t y);
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_pixel(const fe_bitmap * txtr, uint32_t txtr_x, uint32_t txtr_y, uint32_t x, uint32_t y);
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

View File

@ -55,4 +55,5 @@ The bitmap is dynamically allocated, so it should be deleted by using `free()` m
The only argument to pass is the bitmap's address.
### Display
Basically, you can display the bitmap with ``
You cannot display the bitmap yet, but in fxengine, it is not a priority.
However, you can display a specific pixel with `fe_bitmap_display_px()`, or you can get its color with `fe_bitmap_get_px`.