BeRTOS
|
Graphics private header. More...
#include <gfx/gfx.h>
Go to the source code of this file.
Defines | |
#define | BM_PLOT(bm, x, y) ( *BM_ADDR(bm, x, y) |= BM_MASK(bm, x, y) ) |
Plot a pixel in bitmap bm. | |
#define | BM_CLEAR(bm, x, y) ( *BM_ADDR(bm, x, y) &= ~BM_MASK(bm, x, y) ) |
Clear a pixel in bitmap bm. | |
#define | BM_DRAWPIXEL(bm, x, y, fg_pen) |
Set a pixel in bitmap bm to the specified color. | |
#define | BM_READPIXEL(bm, x, y) ( *BM_ADDR(bm, x, y) & BM_MASK(bm, x, y) ? 1 : 0 ) |
Get the value of the pixel in bitmap bm. |
Graphics private header.
Definition in file gfx_p.h.
#define BM_CLEAR | ( | bm, | |
x, | |||
y | |||
) | ( *BM_ADDR(bm, x, y) &= ~BM_MASK(bm, x, y) ) |
#define BM_DRAWPIXEL | ( | bm, | |
x, | |||
y, | |||
fg_pen | |||
) |
do { \ uint8_t *p = BM_ADDR(bm, x, y); \ uint8_t mask = BM_MASK(bm, x, y); \ *p = (*p & ~mask) | ((fg_pen) ? mask : 0); \ } while (0)
Set a pixel in bitmap bm to the specified color.
#define BM_PLOT | ( | bm, | |
x, | |||
y | |||
) | ( *BM_ADDR(bm, x, y) |= BM_MASK(bm, x, y) ) |
#define BM_READPIXEL | ( | bm, | |
x, | |||
y | |||
) | ( *BM_ADDR(bm, x, y) & BM_MASK(bm, x, y) ? 1 : 0 ) |
Get the value of the pixel in bitmap bm.