Product Application

©
Rev.1.1
2.6 Spinners
In this example, the method for drawing spinners is presented. The spinner is an animated overlay that
shows the user that some task is continuing.You will see on the screen spinner bellow two strings.
After some time spinner will change into different type.
Figure 6. Spinner widget example
In the Figure 6 you can see effect of following code:
Ft_Gpu_CoCmd_Dlstart(phost);
Ft_App_WrCoCmd_Buffer(phost,CLEAR_COLOR_RGB(64,64,64));
Ft_App_WrCoCmd_Buffer(phost,CLEAR(1,1,1));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0xff,0xff,0xff));
Ft_Gpu_CoCmd_Text(phost,(FT_DispWidth/2), 20, 27, OPT_CENTER, "Different types of
spinners");
Ft_Gpu_CoCmd_Text(phost,(FT_DispWidth/2), 60, 27, OPT_CENTER, "Please Wait ...");
Ft_Gpu_CoCmd_Spinner(phost, (FT_DispWidth/2),(FT_DispHeight/2),0,0);//style 0 and
scale 0
Ft_App_WrCoCmd_Buffer(phost,DISPLAY());
Ft_Gpu_CoCmd_Swap(phost);
// Download the commands into fifo
Ft_App_Flush_Co_Buffer(phost);
// Wait till coprocessor completes the operation
Ft_Gpu_Hal_WaitCmdfifo_empty(phost);
You can use embedded spinner widget thanks to
Ft_Gpu_CoCmd_Spinner(phost,x,y,style,scale).You can set location of spinner (x,y) and
type (style 0-3) and also scaling (scale).
There is possibility to start an animated screensaver using CMD_SCREENSAVER command. After the
screensaver command, the co-processor engine continuously updates REG_MACRO_0 with VERTEX2F
with varying (x,y) coordinates. With an appropriate display list, this causes a bitmap to move around
the screen without any MCU work. Command CMD_STOP stops the update process. Note that only
one of CMD_SKETCH, CMD_SCREENSAVER, or CMD_SPINNER can be active at one time.