菜鸟问,希望图慢慢往下移动,用for循环不行吗?
我的程序中有这样一段
pLineArray_temp[temp_count].x=temp_three+300;
pLineArray_temp[temp_count].y=temp_two;
float temp_x;
float temp_y;
for(int i=0;i<temp_count;i++)
{
pLineArray[i].x = pLineArray_temp[(temp_count+i)%30].x;
pLineArray[i].y = pLineArray_temp[(temp_count+i)%30].y;
}
用pLineArray_temp画图就可以,但是用pLineArray就画不出来
[解决办法]
1、检查一下新的坐标组是否超出了视图的显示范围;
2、检查像素的颜色值是否为透明色或者是和背景色相同。
[解决办法]
(temp_count+i)%30使用pLineArray_temp的前30帧?
看看要显示的这些线的位置是否在可视范围。
别忘了Invalidate视图