用mfc实现中点画圆但为什么我画出来的只是8分之一的圆?
void CTestbView::OnMipCircle() {
// TODO: Add your command handler code here
/*int x,y,R;
double d;
CInputDlg dlg;
if(dlg.DoModal()==IDOK)
{
x=dlg.m_x;
y=dlg.m_y;
R=dlg.m_R;
}
CDC* pDC=GetDC();
d=1.25-R;
pDC->SetPixel(x,y,RGB(255,0,0));
while(x<y)
{
if(d<0)
{
d+=2*x+3;
x++;
}
else
{
d+=2*(x-y)+5;
x++;
y--;
}
pDC->SetPixel(x,y,RGB(255,0,0));
}
pDC->SetPixel(y,x,RGB(255,0,0));
pDC->SetPixel(-x,y,RGB(255,0,0));
pDC->SetPixel(x,-y,RGB(255,0,0));
pDC->SetPixel(-x,-y,RGB(255,0,0));
pDC->SetPixel(-y,x,RGB(255,0,0));
pDC->SetPixel(y,-x,RGB(255,0,0));
pDC->SetPixel(-y,-x,RGB(255,0,0));
ReleaseDC(pDC);*/