Arc Draws an elliptical arc. ArcTo Draws an elliptical arc. This function is similar to Arc, except that the current position is updated. AngleArc Draws a line segment and an arc, and moves the current position to the ending point of the arc.
请说的具体点,好吗,如圆心(20,20),半径15,从pi/到pi/2。
CDC::Arc 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 );你可以看一下MSDN有区域和两个点就可以画出一段弧.你的圆心就是区域的中心,你给出的两个点就是圆心和你的弧线的两个端点连接线和X轴\Y轴的交点把这些代到函数里就行了
//函数原型 BOOL AngleArc( HDC hdc, // handle to device context int X, // x-coordinate of circle's center int Y, // y-coordinate of circle's center DWORD dwRadius, // circle's radius FLOAT eStartAngle, // arc's start angle FLOAT eSweepAngle // arc's sweep angle ); //具体使用 AngleArc(hdc,20,20,15,pi,-pi/2);//eSweepAngle是相对起始角度计算的角度值
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 ); int x1, int y1, int x2, int y2或者LPCRECT lpRect提供的是圆或椭圆所在的四边形,int x3, int y3或POINT ptStart表明的是圆弧的起点,int x4, int y4或POINT ptEnd 是圆弧的终点。圆弧是按照逆时针方向画的
Draws an elliptical arc.
ArcTo
Draws an elliptical arc. This function is similar to Arc, except that the current position is updated.
AngleArc
Draws a line segment and an arc, and moves the current position to the ending point of the arc.
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 );你可以看一下MSDN有区域和两个点就可以画出一段弧.你的圆心就是区域的中心,你给出的两个点就是圆心和你的弧线的两个端点连接线和X轴\Y轴的交点把这些代到函数里就行了
BOOL AngleArc(
HDC hdc, // handle to device context
int X, // x-coordinate of circle's center
int Y, // y-coordinate of circle's center
DWORD dwRadius, // circle's radius
FLOAT eStartAngle, // arc's start angle
FLOAT eSweepAngle // arc's sweep angle
);
//具体使用
AngleArc(hdc,20,20,15,pi,-pi/2);//eSweepAngle是相对起始角度计算的角度值