none
[mfc]gdi is drawing arc and ellipse by different way RRS feed

  • 질문

  • I want draw arc have big Radius using gdi.

    Drawing is Success.

    but arc is wrong.

    so, I draw ellipse.

    ellipse is Correct.

    why that Two Drawing is Different??

    Sample Code:

    CClientDC dc(this);
    CPen pen(PS_SOLID, 1, 0xff0000);
    dc.SetArcDirection(AD_COUNTERCLOCKWISE);
    CPoint ptTopLeft(-1290, 203);
    CPoint ptBottomRight(4009, 5502);
    CPoint ptStart(550, 329);
    CPoint ptEnd(356, 400);
    dc.Arc(ptTopLeft.x, ptTopLeft.y, ptBottomRight.x, ptBottomRight.y, ptStart.x, ptStart.y, ptEnd.x, ptEnd.y);
    dc.SelectStockObject(NULL_BRUSH);
    dc.Ellipse(ptTopLeft.x, ptTopLeft.y, ptBottomRight.x, ptBottomRight.y);
    2014년 7월 14일 월요일 오전 1:08