问题描述
当起始角度为0并且扫过任何其他角度时,没有问题,但是当起始角度不是0时,该段将不正确。
我尝试了什么:
要将圆圈从0划分为360,我使用了BeginPath(hMemDC);
MoveToEx(hMemDC, 50 , 50 ,(LPPOINT)NULL);
AngleArc(hMemDC, 50 , 50 , 47 , 0 , 45 );
SetArcDirection(m_hMemDC,AD_CLOCKWISE);
LineTo(hMemDC, 50 , 50 );
EndPath(hMemDC);
StrokeAndFillPath(hMemDC);
然后
BeginPath(hMemDC);
MoveToEx(hMemDC, 50 , 50 ,(LPPOINT)NULL);
AngleArc(hMemDC, 50 , 50 , 47 , 45 , 90 );
SetArcDirection(m_hMemDC,AD_CLOCKWISE);
LineTo(hMemDC, 50 , 50 );
EndPath(hMemDC);
StrokeAndFillPath(hMemDC);
等等(90到135,135到180 .....)
但不能正常工作。请帮帮我
调用 SetArcDirection
是没用的。它不会影响 AngleArc
,但必须在此之前调用 Arc
函数。
圆弧绘图的例子可以在 []。
when start angle is 0 and sweep any other angle then there will be no problem but when start angle is other than 0 then the segment will not be proper.
What I have tried:
To divide circle from 0 to 360, i used BeginPath(hMemDC);
MoveToEx(hMemDC,50,50 , (LPPOINT) NULL); AngleArc(hMemDC, 50 , 50 , 47, 0, 45); SetArcDirection(m_hMemDC, AD_CLOCKWISE); LineTo(hMemDC,50,50); EndPath(hMemDC); StrokeAndFillPath(hMemDC);
then
BeginPath(hMemDC); MoveToEx(hMemDC,50,50 , (LPPOINT) NULL); AngleArc(hMemDC, 50 , 50 , 47, 45, 90); SetArcDirection(m_hMemDC, AD_CLOCKWISE); LineTo(hMemDC,50,50); EndPath(hMemDC); StrokeAndFillPath(hMemDC);
and so on (90 to 135 , 135 to 180 ..... )
but not working properly. Please help me
Calling SetArcDirection
is useless. It does not effect AngleArc
but the Arc
function and must be called before that.
Examples on arc drawing can be found at CDC, Arc, ArcTo, Pie, Chord, AngleArc, Visual C++ Source Code[^].
这篇关于使用角度arc()划分圆在mfc中无法正常工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!