2021-08-10 15:02:33 +08:00
|
|
|
|
//<2F><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD>ƿ<EFBFBD>
|
|
|
|
|
|
|
2021-08-04 10:46:24 +08:00
|
|
|
|
#ifndef __GE_DRAW_H
|
|
|
|
|
|
#define __GE_DRAW_H
|
|
|
|
|
|
|
2021-09-28 14:24:41 +08:00
|
|
|
|
#include "sys.h"
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><>ɫ<EFBFBD>궨<EFBFBD><EAB6A8>
|
2021-08-04 10:46:24 +08:00
|
|
|
|
#define BLACK 0x0000
|
|
|
|
|
|
#define NAVY 0x000f
|
|
|
|
|
|
#define DARK_GREEN 0x03e0
|
|
|
|
|
|
#define DARK_CYAN 0x03ef
|
|
|
|
|
|
#define MAROON 0x7800
|
|
|
|
|
|
#define PURPLE 0x780f
|
|
|
|
|
|
#define OLIVE 0x7be0
|
|
|
|
|
|
#define LIGHT_GREY 0xc618
|
|
|
|
|
|
#define DARK_GREY 0x7bef
|
|
|
|
|
|
#define BLUE 0x001f
|
|
|
|
|
|
#define GREEN 0x07e0
|
|
|
|
|
|
#define CYAN 0x07ff
|
|
|
|
|
|
#define RED 0xf800
|
|
|
|
|
|
#define MAGENTA 0xf81f
|
|
|
|
|
|
#define YELLOW 0xffe0
|
|
|
|
|
|
#define WHITE 0xffff
|
|
|
|
|
|
|
2021-09-28 14:24:41 +08:00
|
|
|
|
/**************************************** <20>Դ<EFBFBD> ****************************************/
|
|
|
|
|
|
|
|
|
|
|
|
extern uint8_t GE_Draw_VRam[153600];
|
2021-08-04 10:46:24 +08:00
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/***************************************** <20><>ʼ<EFBFBD><CABC> *****************************************/
|
|
|
|
|
|
|
|
|
|
|
|
void GE_Draw_Init(void);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************************/
|
|
|
|
|
|
|
2021-09-28 14:24:41 +08:00
|
|
|
|
/**************************************** ˢ<><CBA2><EFBFBD><EFBFBD>Ļ ****************************************/
|
|
|
|
|
|
|
|
|
|
|
|
void GE_Draw_Disp(void);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************************/
|
|
|
|
|
|
|
2021-08-04 10:46:24 +08:00
|
|
|
|
/**************************************** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ ****************************************/
|
|
|
|
|
|
|
|
|
|
|
|
void GE_Draw_ClrAll(uint16_t color);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************** <20><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD> ****************************************/
|
|
|
|
|
|
|
2021-09-28 14:24:41 +08:00
|
|
|
|
void GE_Draw_Fill(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t color);
|
|
|
|
|
|
void GE_Draw_Point(int16_t x, int16_t y, uint16_t color);
|
|
|
|
|
|
uint16_t GE_Draw_GetPoint(int16_t x, int16_t y);
|
2021-10-06 00:43:18 +08:00
|
|
|
|
void GE_Draw_Line(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
|
2021-09-28 14:24:41 +08:00
|
|
|
|
void GE_Draw_Rectangle(int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t color);
|
|
|
|
|
|
void GE_Draw_Circle(int16_t xm, int16_t ym, uint16_t r, uint16_t color);
|
2021-10-06 00:43:18 +08:00
|
|
|
|
void GE_Draw_FillCircle(int16_t xm, int16_t ym, uint16_t r, uint16_t color);
|
2021-09-28 14:24:41 +08:00
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************************/
|
2021-08-04 10:46:24 +08:00
|
|
|
|
|
|
|
|
|
|
/**************************************** <20><><EFBFBD><EFBFBD>ͼƬ ****************************************/
|
|
|
|
|
|
//<2F><>ʾλ<CABE><CEBB>
|
|
|
|
|
|
#define UP_LEFT 0 //<2F><><EFBFBD>Ͻ<EFBFBD>
|
|
|
|
|
|
#define MID 1 //<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
|
{
|
|
|
|
|
|
uint8_t is_reverse; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ɫ
|
|
|
|
|
|
uint8_t pos_mode; //<2F><>ʾλ<CABE><CEBB>
|
|
|
|
|
|
} _ge_draw_pic_set;
|
|
|
|
|
|
|
|
|
|
|
|
extern _ge_draw_pic_set ge_draw_pic_set;
|
|
|
|
|
|
|
|
|
|
|
|
void GE_Draw_Pic(
|
2021-09-28 14:24:41 +08:00
|
|
|
|
int16_t x,
|
|
|
|
|
|
int16_t y,
|
2021-08-04 10:46:24 +08:00
|
|
|
|
uint8_t is_reverse,
|
|
|
|
|
|
uint8_t pos_mode,
|
|
|
|
|
|
const unsigned char *pic,
|
|
|
|
|
|
uint16_t width,
|
|
|
|
|
|
uint16_t height);
|
2021-09-28 14:24:41 +08:00
|
|
|
|
void GE_Draw_Pic_WithSet(int16_t x, int16_t y, const unsigned char *pic, uint16_t width, uint16_t height);
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/************************************** <20><><EFBFBD>Ƶ<EFBFBD>ɫλͼ **************************************/
|
|
|
|
|
|
//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>ɫ
|
|
|
|
|
|
#define MONO_OR 0
|
|
|
|
|
|
#define MONO_AND 1
|
|
|
|
|
|
#define MONO_XOR 2
|
|
|
|
|
|
#define MONO_COVER 3
|
|
|
|
|
|
|
|
|
|
|
|
void GE_Draw_Mono(
|
|
|
|
|
|
int16_t x,
|
|
|
|
|
|
int16_t y,
|
|
|
|
|
|
uint8_t draw_mode,
|
|
|
|
|
|
uint8_t pos_mode,
|
|
|
|
|
|
uint16_t mono_color,
|
|
|
|
|
|
uint16_t back_color,
|
|
|
|
|
|
const unsigned char *pic,
|
|
|
|
|
|
uint16_t width,
|
|
|
|
|
|
uint16_t height);
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
|
{
|
|
|
|
|
|
uint8_t draw_mode; //<2F><><EFBFBD>Ʒ<EFBFBD>ʽ
|
|
|
|
|
|
uint8_t pos_mode; //<2F><>ʾλ<CABE><CEBB>
|
|
|
|
|
|
uint16_t mono_color; //<2F><>ɫ
|
|
|
|
|
|
uint16_t back_color; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
} _ge_draw_mono_set;
|
|
|
|
|
|
|
|
|
|
|
|
extern _ge_draw_mono_set ge_draw_mono_set;
|
|
|
|
|
|
|
|
|
|
|
|
void GE_Draw_Mono_WithSet(
|
|
|
|
|
|
int16_t x,
|
|
|
|
|
|
int16_t y,
|
|
|
|
|
|
const unsigned char *pic,
|
|
|
|
|
|
uint16_t width,
|
|
|
|
|
|
uint16_t height);
|
2021-08-04 10:46:24 +08:00
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|