Product Application
©
Rev.1.1
2.8 Sketch function usage
In this example, the method for using sketch function is presented. You will see on the screen white
area surrounded by the frame with string “Draw test”. After touching white area remains black trace
on it. You can clear this area pressing “CLEAR” button.
Figure 8. Sketch example
In the Figure 8 you can see effect of following code:
ft_void_t Sketch()
{
/*************************************************************************/
/* Below code demonstrates the usage of sketch function. Sketch function */
/* draws line for pen movement. Skecth supports L1 and L8 output formats */
/* Sketch draws till stop command is executed. */
/*************************************************************************/
ft_int16_t BorderSz = 40;
ft_int16_t BorderSz2 = 16;
ft_uint32_t MemZeroSz;
MemZeroSz = 1L*(FT_DispWidth - 2*BorderSz2)*(FT_DispHeight - BorderSz -
BorderSz2);
if(FirstTimeThisDemo == 1)
{
//Clear memory
Ft_Gpu_CoCmd_MemZero(phost, (RAM_G+ending_address),MemZeroSz);
FirstTimeThisDemo=0;
}
/* Sketch L8 format */
/* Send command sketch */
if(tftConfig==RTP35 || tftConfig==RTP43)
{
Ft_Gpu_CoCmd_Sketch(phost, BorderSz2,BorderSz,(FT_DispWidth -
2*BorderSz2),(FT_DispHeight - BorderSz -
BorderSz2),(RAM_G+ending_address),L8);//sketch in L8 format
}
if(tftConfig==CTP35 || tftConfig==CTP43)
{
Ft_Gpu_CoCmd_CSketch(phost, BorderSz2,BorderSz,(FT_DispWidth -
2*BorderSz2),(FT_DispHeight - BorderSz -
BorderSz2),(RAM_G+ending_address),L8,9000);//sketch in L8 format
}










