97 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			97 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
#ifndef MYWIN_LCD_H__
 | 
						||
#define MYWIN_LCD_H__
 | 
						||
 | 
						||
// 创建一个虚拟屏幕
 | 
						||
WIN_LcdStruct *WIN_CreatVirtualLcd(int x_size, int y_size);
 | 
						||
 | 
						||
// 删除虚拟屏幕
 | 
						||
void WIN_DeleteVirtualLcd(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
// 设置屏幕显示方向
 | 
						||
void WIN_LcdSetScreenDis(WIN_LcdStruct *lcd, int d);
 | 
						||
 | 
						||
// 设置活动窗口
 | 
						||
void WIN_LcdSetWindow(WIN_LcdStruct *lcd, int x_s, int y_s, int x_size,
 | 
						||
                      int y_size);
 | 
						||
 | 
						||
int WIN_LcdGetWindowSizeX(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
int WIN_LcdGetWindowSizeY(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
int WIN_LcdGetLcdSizeX(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
int WIN_LcdGetLcdSizeY(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
u32 WIN_LcdSetLcdColor(WIN_LcdStruct *lcd, u32 color);
 | 
						||
 | 
						||
u32 WIN_LcdSetLcdBkColor(WIN_LcdStruct *lcd, u32 color);
 | 
						||
 | 
						||
u32 WIN_LcdSetLcdColor16(WIN_LcdStruct *lcd, u32 color);
 | 
						||
 | 
						||
u32 WIN_LcdSetLcdBkColor16(WIN_LcdStruct *lcd, u32 color);
 | 
						||
 | 
						||
u32 WIN_LcdGetLcdColor(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
u32 WIN_LcdGetLcdBkColor(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
u32 WIN_LcdGetLcdColor16(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
u32 WIN_LcdGetLcdBkColor16(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
// 设置绘制模式,1,不绘制背景,0,绘制背景
 | 
						||
void WIN_LcdSetLcdDrawMode(WIN_LcdStruct *lcd, int mode);
 | 
						||
 | 
						||
void WIN_LcdFillRectOff16At(WIN_LcdStruct *lcd, int s_x, int s_y, int s_xsize,
 | 
						||
                            int s_ysize, u16 *buff, int x_s, int y_s, int xsize,
 | 
						||
                            int ysize);
 | 
						||
 | 
						||
// 安全画点,以屏幕窗口的坐标为原点,并且画点不会超出窗口范围
 | 
						||
void WIN_LcdDrawPointSafe(WIN_LcdStruct *lcd, int x, int y, int mode);
 | 
						||
 | 
						||
// 安全画点,以屏幕窗口的坐标为原点,并且画点不会超出窗口范围
 | 
						||
// 以指定颜色画点,而不是前景色
 | 
						||
void WIN_LcdDrawPointSafeColor(WIN_LcdStruct *lcd, int x, int y, u16 color);
 | 
						||
 | 
						||
// 以指定色透明度画点0~32,0,全透明,31,不透明
 | 
						||
void WIN_LcdDrawPointSafeColorAlpha(WIN_LcdStruct *lcd, int x, int y, u16 color,
 | 
						||
                                    u8 alpha);
 | 
						||
 | 
						||
// 填充矩形,已窗口坐标为原点
 | 
						||
void WIN_LcdFillRectByColor(WIN_LcdStruct *lcd, int x, int y, int x_size,
 | 
						||
                            int y_size);
 | 
						||
 | 
						||
// 以透明度填充矩形,已窗口坐标为原点
 | 
						||
void WIN_LcdFillRectByColorAlpha(WIN_LcdStruct *lcd, int x, int y, int x_size,
 | 
						||
                                 int y_size, u8 alpha);
 | 
						||
 | 
						||
// 绘制图标,图标使用const数组编译在程序里,其本身已经附带了大小等参数
 | 
						||
// 此函数效率比较低,只用于绘制小图标,绘制图片使用矩形填充函数
 | 
						||
void WIN_LcdDrawImag(WIN_LcdStruct *lcd, int x, int y, int xsize, int ysize,
 | 
						||
                     const u8 *buff);
 | 
						||
 | 
						||
// 绘制图标,但是不绘制指定颜色
 | 
						||
void WIN_LcdDrawImagButColor(WIN_LcdStruct *lcd, int x, int y, int xsize,
 | 
						||
                             int ysize, const u8 *buff, u16 color);
 | 
						||
 | 
						||
// 绘制图标,把图像的有效部分绘制为指定颜色
 | 
						||
// 此函数效率比较低,只用于绘制小图标,绘制图片使用矩形填充函数
 | 
						||
void WIN_LcdDrawImagByColor(WIN_LcdStruct *lcd, int x, int y, int xsize,
 | 
						||
                            int ysize, const u8 *buff, u16 color);
 | 
						||
 | 
						||
// 绘制图标,把原图像转化为透明度,用指定颜色来绘制
 | 
						||
// 此函数效率比较低,只用于绘制小图标,绘制图片使用矩形填充函数
 | 
						||
void WIN_LcdDrawImagByAlpha(WIN_LcdStruct *lcd, int x, int y, int xsize,
 | 
						||
                            int ysize, const u8 *buff, u16 color);
 | 
						||
 | 
						||
// 清除绘图窗口内的显示
 | 
						||
void WIN_LcdClear(WIN_LcdStruct *lcd);
 | 
						||
 | 
						||
// 清除矩形内的显示
 | 
						||
void WIN_LcdClearRect(WIN_LcdStruct *lcd, int x, int y, int x_size, int y_size);
 | 
						||
 | 
						||
// 获取指定矩形空间的屏幕颜色,屏幕的绝对坐标
 | 
						||
void WIN_LcdGetColors(WIN_LcdStruct *lcd, u16 *buff, int x_s, int y_s,
 | 
						||
                      int x_size, int y_size);
 | 
						||
 | 
						||
#endif
 |