FxEngine  0.0.1
3d engine for fx9860G calculators
bitmap.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  bitmap_rich
 bitmap rich type transparency is in the layout More...
 

Typedefs

typedef struct bitmap_rich bitmap_rich
 

Functions

bitmap_richbitmap_new_rich (uint32_t size_px_x, uint32_t size_px_y, uint32_t *color, bool copy_color, uint32_t *layout, bool copy_layout)
 { function_description } More...
 
void bitmap_delete_rich (bitmap_rich *bmp)
 delete a rich bitmap created with bitmap_new_rich() More...
 
uint8_t bitmap_get_pixel_r (const bitmap_rich *bmp, uint32_t x, uint32_t y)
 get the color of pixel from rich bitmap More...
 
void bitmap_display_pixel_r (const bitmap_rich *bmp, uint32_t bmp_x, uint32_t bmp_y, uint32_t x, uint32_t y)
 display a specific rich bitmap pixel on the screen More...
 

Typedef Documentation

◆ bitmap_rich

typedef struct bitmap_rich bitmap_rich

Definition at line 20 of file bitmap.h.

Function Documentation

◆ bitmap_delete_rich()

void bitmap_delete_rich ( bitmap_rich bmp)

delete a rich bitmap created with bitmap_new_rich()

Parameters
bmpThe bitmap to delete

◆ bitmap_display_pixel_r()

void bitmap_display_pixel_r ( const bitmap_rich bmp,
uint32_t  bmp_x,
uint32_t  bmp_y,
uint32_t  x,
uint32_t  y 
)

display a specific rich bitmap pixel on the screen

Parameters
[in]bmpThe bitmap
[in]bmp_xThe bitmap x coordinate (in pixels)
[in]bmp_yThe bitmap y coordinate (in pixels)
[in]xscreen : x coordinate
[in]yscreen : y coordinate

◆ bitmap_get_pixel_r()

uint8_t bitmap_get_pixel_r ( const bitmap_rich bmp,
uint32_t  x,
uint32_t  y 
)
inline

get the color of pixel from rich bitmap

Parameters
[in]bmpThe bitmap
[in]xThe bitmap x coordinate (in pixels)
[in]yThe bitmap y coordinate (in pixels)
Returns
the color coded in a unsigned char : if (color >> 1) switch (color%2) { case 0: // WHITE break; case 1: // BLACK } else

◆ bitmap_new_rich()

bitmap_rich* bitmap_new_rich ( uint32_t  size_px_x,
uint32_t  size_px_y,
uint32_t *  color,
bool  copy_color,
uint32_t *  layout,
bool  copy_layout 
)

{ function_description }

Parameters
[in]size_px_xThe width in px
[in]size_px_yThe height in px
colorcolor origin
[in]copy_colorif you want to make a copy, or only to make a link
layoutlayout origin -> can be set as 0 if it isn't needed
[in]copy_layoutif you want to make a copy, or to make a link
Returns
a rich bitmap, ready to use !