basedraw.c

来自「液晶菜单 51串行实现 调试已通过」· C语言 代码 · 共 42 行

C
42
字号
#include "LCD_Dis.h"
#include "Key_Service.h"

void BaseDraw(void)
{
	unsigned char Exit_flag=1;
//	LCD_Init();
	ClrScreen();
	
	SetPaintMode(1,1);				//设置绘图前景色为黑色
	PutPixel(0,0);					//绘制点
	PutPixel(0,1);
	PutPixel(0,3);
	PutPixel(2,0);
	PutPixel(4,0);
	PutPixel(6,0);
	PutPixel(3,3);

	Line(0,6,127,6);				//绘制直线
	Line(8,8,120,8);
	Line(3,10,3,30);
	Line(10,10,30,30);
	Line(10,30,30,10);

	Rectangle(35,10,65,30,0); 		//绘制矩形
	Rectangle(70,10,100,30,1);

	Circle(30,48,15,0);
	Circle(30,48,13,1);

	while(Exit_flag)
	{
		TimeDelay(1);
		KeyScan_Service();	
		if(Key_Get()==2) Exit_flag = 0;
	}
	FontMode(0,0);
}



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?