⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guitest.c

📁 基于s3c2410gui(图形用户界面)应用程序源码!
💻 C
字号:
/* gui.c: Graphics demos
 * 
 *	Programmed By Chen: Yang (support@hhcn.com)
 *	
 * 	
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */
#include <stdio.h>   /* Standard input/output definitions */
#include <string.h>  /* String function definitions */
#include <unistd.h>  /* UNIX standard function definitions */
#include <fcntl.h>   /* File control definitions */
#include <errno.h>   /* Error number definitions */
#include <termios.h> /* POSIX terminal control definitions */
#include<sys/types.h>
#include<sys/stat.h>
#include <stdlib.h>

#include "gui.h"
void delay()		/*延时函数*/
{int i,j;

 for(i=0;i<1000;i++)
  for(j=0;j<7000;j++) {}
 }
main(int argc,char*argv[])
{
   short i,j,w,h;
   struct stat st;
   int color0,filelength;	
   PatternIndex p1=BlackPattern;
   
   /*定义缓冲区,并初始化*/
   char buf[20]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
   char buf1[700000];
   short  *o,*c;
   int *p;
   long *q;
   
   FILE *fp;
  
  /*初始化液晶屏*/
  initgraph();
  clearscreen();
  
  //fillrect(10,10,100,100);
  //ellipse(20,130,90,140); 
  //textout(0,130,"Welcome to HHTech\n\nhharm-support@hhcn.com",0x07e0/*0xf800*/,0x0000);
	setcolor(0x07e0);
	line(20,90,100,130,0x07e0);
	rectangle(30,50,100,200,0xf800);
	fillrectangle(60,50,160,260);
	closegraph(); 
 
}

⌨️ 快捷键说明

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