vc 旋转点

CClientDC dc(this);

double pi =3.1415926535; 

double r =50;//半径

CPoint temp;//终点

CPen penBound;//建立画笔

for(double i = 0 ;i < 360;i=i+8)

{

//时间差动画测试

for(int w = 0 ; w < 10000000 ; w++){

}

dc.MoveTo(cpoint); 

temp.x = 400.0 + r*cos(i*pi/180.0) - r*sin(i*pi/180.0);

temp.y = 250.0 + r*cos(i*pi/180.0) + r*sin(i*pi/180.0);

dc.SetPixel(temp,RGB(0,0,255));

}

你可能感兴趣的:(VC)