C++ MFC 编程问题求解
以下是我的程序:CRectrc;GetClientRect(&rc);pDC->SetWindowOrg(0,0);pDC->SetViewportOrg(rc.righ...
以下是我的程序:
CRect rc;GetClientRect(&rc);
pDC->SetWindowOrg(0,0);
pDC->SetViewportOrg(rc.right/2,rc.bottom/2);
pDC->SetWindowExt(100,150);
pDC->SetViewportExt(100,-150);
CPen p(PS_SOLID,3,RGB(0,0,0));
double x,y,a,b;
pDC->SelectObject(p);
for(int i=0;i<=7;i++)
{
double t=3.1415926/8*i;
x=-100*cos(t)-40*sin(t);
y=-100*sin(t)+40*cos(t);
a=100*cos(t);
b=100*sin(t);
pDC->Arc(x,y,-x,-y,a,b,a,b);
}
}
输出结果却是:
求大神指导 展开
CRect rc;GetClientRect(&rc);
pDC->SetWindowOrg(0,0);
pDC->SetViewportOrg(rc.right/2,rc.bottom/2);
pDC->SetWindowExt(100,150);
pDC->SetViewportExt(100,-150);
CPen p(PS_SOLID,3,RGB(0,0,0));
double x,y,a,b;
pDC->SelectObject(p);
for(int i=0;i<=7;i++)
{
double t=3.1415926/8*i;
x=-100*cos(t)-40*sin(t);
y=-100*sin(t)+40*cos(t);
a=100*cos(t);
b=100*sin(t);
pDC->Arc(x,y,-x,-y,a,b,a,b);
}
}
输出结果却是:
求大神指导 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询