add fonts and draw text functions.
This commit is contained in:
23
include/fonts.h
Normal file
23
include/fonts.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef __FONTS_H
|
||||
#define __FONTS_H
|
||||
|
||||
#define MAX_HEIGHT_FONT 41
|
||||
#define MAX_WIDTH_FONT 32
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
//ASCII
|
||||
typedef struct _tFont
|
||||
{
|
||||
const uint8_t *table;
|
||||
uint16_t Width;
|
||||
uint16_t Height;
|
||||
} sFONT;
|
||||
|
||||
extern sFONT Font24;
|
||||
extern sFONT Font20;
|
||||
extern sFONT Font16;
|
||||
extern sFONT Font12;
|
||||
extern sFONT Font8;
|
||||
|
||||
#endif
|
@@ -5,6 +5,9 @@
|
||||
|
||||
void fb_draw_pixel(uint16_t *image, uint16_t x, uint16_t y, uint16_t color);
|
||||
void fb_draw_line(uint16_t *image, int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
|
||||
void fb_draw_char(uint16_t *image, uint16_t Xpoint, uint16_t Ypoint, const char Acsii_Char, sFONT* Font, uint16_t Color_Foreground);
|
||||
void fb_draw_string(uint16_t *image, uint16_t Xstart, uint16_t Ystart, const char * pString, sFONT* Font, uint16_t Color_Foreground);
|
||||
|
||||
void fb_load_image(uint16_t *dst, uint16_t *src, uint32_t length);
|
||||
void fb_set_image(uint16_t *dst, uint16_t value, uint32_t length);
|
||||
|
||||
|
Reference in New Issue
Block a user