中级会员
- 积分
- 419
- 金钱
- 419
- 注册时间
- 2012-10-17
- 在线时间
- 20 小时
|
1金钱
请问 EMWIN实验9 分段存储设备,当中的
//分段存储演示程序
void _DemoBandingMemdev(void)
{
tDrawItContext DrawItContext;
int i, swap=0;
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
GUI_SetColor(GUI_YELLOW);
GUI_SetFont(&GUI_Font24_ASCII);
GUI_DispStringHCenterAt("MEMDEV_Banding - Sample", 160, 5);
GUI_SetFont(&GUI_Font16_ASCII);
GUI_DispStringHCenterAt("Banding memory device\nwithout flickering", 160, 40);
DrawItContext.XPos_Poly = 160;
DrawItContext.YPos_Poly = 120;
DrawItContext.YPos_Text = 116;
while (1)
{
swap = ~swap;
for (i = 0; i < 220; i++)
{
float angle = i * 3.1415926 / 55;
DrawItContext.XPos_Text = (swap) ? i : 220 - i;
//旋转多边形
GUI_RotatePolygon(DrawItContext.aPointsDest, aPoints,
SIZE_OF_ARRAY(aPoints), angle);
#if USE_BANDING_MEMDEV
{
GUI_RECT Rect = {0, 70, 320,170};
GUI_MEMDEV_Draw(&Rect,&_DrawIt,&DrawItContext,0,0);//使用分段存储绘制
}
#else
//
_DrawIt((void *)&DrawItContext);
#endif
}
}
}
这个函数当中的float angle = i * 3.1415926 / 55; 是啥意思?
|
|