Product Application
©
Rev.1.1
OPT_CENTERX centers the text horizontally, OPT_CENTERY centers it vertically. OPT_CENTER centers
the text in both directions. OPT_RIGHTX right-justifies the text, so that the x is the rightmost pixel.
The value of OPT_RIGHTX is 2048. The string contain displayed text.
Ft_App_WrCoCmd_Buffer(phost, command) function write command into command buffer of
FT800/FT801. Ft_Gpu_CoCmd_Swap(phost) function swap current display list.
2.3 Points drawing
In this example, the method for drawing circles (points) in different colors and locations is presented.
You will see 4 points (red, green, blue and yellow) in different sizes and positions on the white
background. Bellow this points will be drawing text “POINTS” as described in previous sub-section.
Figure 3. Point drawing example
In the Figure 3 you can see effect of following code:
Ft_Gpu_CoCmd_Dlstart(phost);
Ft_App_WrCoCmd_Buffer(phost,CLEAR_COLOR_RGB(255,255,255));//color white
Ft_App_WrCoCmd_Buffer(phost,CLEAR(1,1,1));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(128, 0, 0));
Ft_App_WrCoCmd_Buffer(phost,POINT_SIZE((FT_DispWidth/5) * 16));
Ft_App_WrCoCmd_Buffer(phost,BEGIN(FTPOINTS));// start drawing points
Ft_App_WrCoCmd_Buffer(phost,VERTEX2F((FT_DispWidth/5) * 16, (FT_DispHeight/2) *
16));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0, 128, 0));
Ft_App_WrCoCmd_Buffer(phost,POINT_SIZE((FT_DispWidth/6) * 16));
Ft_App_WrCoCmd_Buffer(phost,VERTEX2F((FT_DispWidth*2/5) * 16, (FT_DispHeight/2) *
16));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0, 0, 128));
Ft_App_WrCoCmd_Buffer(phost,POINT_SIZE((FT_DispWidth/7) * 16));
Ft_App_WrCoCmd_Buffer(phost,VERTEX2F((FT_DispWidth*3/5) * 16, (FT_DispHeight/2) *
16));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(128, 128, 0));
Ft_App_WrCoCmd_Buffer(phost,POINT_SIZE((FT_DispWidth/8) * 16));
Ft_App_WrCoCmd_Buffer(phost,VERTEX2F((FT_DispWidth*4/5) * 16, (FT_DispHeight/2) *
16));
Ft_App_WrCoCmd_Buffer(phost,COLOR_RGB(0, 128, 128));
Ft_App_WrCoCmd_Buffer(phost,END());
Ft_Gpu_CoCmd_Text(phost,hoffset, voffset, 31, OPT_CENTERX, "POINTS");
Ft_App_WrCoCmd_Buffer(phost,DISPLAY());
Ft_Gpu_CoCmd_Swap(phost);
/* Download the commands into fifo */
Ft_App_Flush_Co_Buffer(phost);










