add fonts and draw text functions.

This commit is contained in:
Thomas Klaehn
2020-02-23 16:36:49 +01:00
parent fc8d9186be
commit 40f96f5075
9 changed files with 8695 additions and 2 deletions

23
include/fonts.h Normal file
View 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

View File

@@ -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);