-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlcd_graphic.h
45 lines (30 loc) · 1011 Bytes
/
lcd_graphic.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _INC_LCD_GRAPHIC_H_
#define _INC_LCD_GRAPHIC_H_
#define SUPPORT_LCD_FONT
#ifdef __cplusplus
extern "C" {
#endif
typedef struct{
int Width;
int Height;
int BitPerPixel;
int FrameSize;
uint8_t *pFrame;
}LCD_CANVAS;
#define LCD_WHITE 0x00
#define LCD_BLACK 0xFF
void DRAW_Clear(LCD_CANVAS *pCanvas, int Color);
void DRAW_Line(LCD_CANVAS *pCanvas, int X1, int Y1, int X2, int Y2, int Color);
void DRAW_Pixel(LCD_CANVAS *pCanvas, int X, int Y, int Color);
void DRAW_Rect(LCD_CANVAS *pCanvas, int X1, int Y1, int X2, int Y2, int Color);
void DRAW_Circle(LCD_CANVAS *pCanvas, int x0, int y0, int Radius, int Color);
void DRAW_Refresh(LCD_CANVAS *pCanvas);
#ifdef SUPPORT_LCD_FONT
#include "font.h"
void DRAW_PrintChar(LCD_CANVAS *pCanvas, int X0, int Y0, char Text, int Color, FONT_TABLE *font_table);
void DRAW_PrintString(LCD_CANVAS *pCanvas, int X0, int Y0, char *pText, int Color, FONT_TABLE *font_table);
#endif //SUPPORT_LCD_FONT
#ifdef __cplusplus
}
#endif
#endif