我知道圆弧的起点和终点,以及圆心,我想根据着三个参数绘制圆弧,不知用什么命令?
要是用pDC->Arc(……),请具体讲一下参数如何设置,才能按我的要求绘制?

解决方案 »

  1.   

    BOOL Arc( int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4 );BOOL Arc( LPCRECT lpRect, POINT ptStart, POINT ptEnd );Return ValueNonzero if the function is successful; otherwise 0.Parametersx1Specifies the x-coordinate of the upper-left corner of the bounding rectangle (in logical units).y1Specifies the y-coordinate of the upper-left corner of the bounding rectangle (in logical units).x2Specifies the x-coordinate of the lower-right corner of the bounding rectangle (in logical units).y2Specifies the y-coordinate of the lower-right corner of the bounding rectangle (in logical units).x3Specifies the x-coordinate of the point that defines the arc’s starting point (in logical units). This point does not have to lie exactly on the arc.y3Specifies the y-coordinate of the point that defines the arc’s starting point (in logical units). This point does not have to lie exactly on the arc.x4Specifies the x-coordinate of the point that defines the arc’s endpoint (in logical units). This point does not have to lie exactly on the arc.y4Specifies the y-coordinate of the point that defines the arc’s endpoint (in logical units). This point does not have to lie exactly on the arc.lpRectSpecifies the bounding rectangle (in logical units). You can pass either an LPRECT or a CRect object for this parameter.ptStartSpecifies the x- and y-coordinates of the point that defines the arc’s starting point (in logical units). This point does not have to lie exactly on the arc. You can pass either a POINT structure or a CPoint object for this parameter.ptEndSpecifies the x- and y-coordinates of the point that defines the arc’s ending point (in logical units). This point does not have to lie exactly on the arc. You can pass either a POINT structure or a CPoint object for this parameter.
      

  2.   

    看看MSDN自然就知道了
    Visual Studio
      -> Visual C++
        ->Refrence
          ->Microsoft Fundation Classes查看CDC类
      

  3.   

    1.根据起点和圆心,可以得半径
    2.根据圆心和半径,可以得外包矩形rcTemp
    3.Arc (rcTemp, ptStart, ptEnd);