38 lines
700 B
C
38 lines
700 B
C
![]() |
/*
|
||
|
* (c) 2011 Siegen, Germany by Nils Faerber <nils.faerber@kernelconcepts.de>
|
||
|
*
|
||
|
* license LGPL
|
||
|
*/
|
||
|
|
||
|
#ifndef _MW_UTILITY_H
|
||
|
#define _MW_UTILITY_H
|
||
|
|
||
|
typedef struct {
|
||
|
unsigned int res_x;
|
||
|
unsigned int res_y;
|
||
|
unsigned char bpp;
|
||
|
void *pbuf;
|
||
|
} mw_buffer;
|
||
|
|
||
|
typedef enum {
|
||
|
MW_BLACK = 0,
|
||
|
MW_WHITE,
|
||
|
} mw_color;
|
||
|
|
||
|
mw_buffer *mw_alloc_pbuffer(unsigned int res_x, unsigned int res_y, unsigned int bpp);
|
||
|
|
||
|
void mw_free_pbuffer(mw_buffer *mwbuf);
|
||
|
|
||
|
void mw_dump_mw_buffer(mw_buffer *mwbuf);
|
||
|
|
||
|
|
||
|
/* clear/fill entire buffer with color */
|
||
|
void mw_buf_clear(mw_buffer *mwbuf, mw_color clr);
|
||
|
|
||
|
/* draw a single pixel */
|
||
|
void mw_buf_draw_pixel(mw_buffer *mwbuf, unsigned int x, unsigned int y, mw_color clr);
|
||
|
|
||
|
|
||
|
#endif
|
||
|
|