#include "GUI.h"
#include "system.h"
#include "io.h"
#include "alt_types.h"
#include"stdio.h"
#include"unistd.h"
#include"bitmap.h"
#include"graphics.h"
#include"string.h"
int main(void)
{
GUI_Init();
int i;
while(1)
{
GUI_Clear();
for(i=0;i<lcd_frame/2;i++) IOWR_32DIRECT(SRAM_BASE,4*i,image[4*i]+(image[4*i+1]<<8)+(image[4*i+2]<<16)+(image[4*i+3]<<24));
set_color(BRIGHTBLUE);
frame(0,0,319,239,10);
GUI_SetTextMode(2);
GUI_SetColor(GUI_WHITE);
GUI_DispStringHCenterAt("Hainan",160,20);
usleep(5000000);
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
GUI_FillEllipse(160,120,80,60);
GUI_DispStringHCenterAt("Ellipse",160,20);
usleep(5000000);
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
GUI_DispStringHCenterAt("XOR MODE",160,20);
GUI_SetDrawMode(GUI_DRAWMODE_NORMAL);
GUI_FillCircle(150, 114, 40);
GUI_SetDrawMode(GUI_DRAWMODE_XOR);
GUI_FillCircle(170, 134, 40);
GUI_SetDrawMode(GUI_DRAWMODE_NORMAL);
GUI_DrawRect(200,180,300,220);
usleep(1000000);
GUI_ClearRect(200,180,300,220);
GUI_DrawRect(0,0,319,239);
usleep(10000000);
}
return 0;
}