如何在运行时覆盖其他角度弧 [英] How to overwrite one angle arc over other during runtime
问题描述
我使用角度弧将圆分成8段,当我延伸一个角度弧然后另一个消失时,它不会覆盖做什么?
我尝试过:
i使用以下代码
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);
然后
MoveToEx(hMemDC,50,50,(LPPOINT)NULL);
AngleArc(hMemDC,50,50,47,45,45);
SetArcDirection(m_hMemDC,AD_CLOCKWISE);
LineTo(hMemDC,50,50);
EndPath(hMemDC);
StrokeAndFillPath(hMemDC);
等等..
现在如果我想增加第二段的角度为55度,然后第三段消失。如何解决?
您必须重新绘制所有步骤。想象它是卡通和管理每一张照片。您需要一些计时器,它会增加并调用您的涂料程序。< br $>
元代码:
// 准备代码
// 获得DC等等......
// 获取步骤
int step = ticker%STEPCOUNT;
switch (步骤)
{
case 0 :
// draw step 0
break ;
case 1 : / / 绘制步骤0
break ;
// 依此类推......
}
// 清理......
I used angle arc to divide circle into 8 segments, when i extend an angle of one angle arc then the other dissappears , it does not overwrites what to do?
What I have tried:
i used the below code
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
MoveToEx(hMemDC,50,50 , (LPPOINT) NULL);
AngleArc(hMemDC, 50 , 50 , 47, 45, 45);
SetArcDirection(m_hMemDC, AD_CLOCKWISE);
LineTo(hMemDC,50,50);
EndPath(hMemDC);
StrokeAndFillPath(hMemDC);
and so on..
now if i want to increase the angle of 2nd segment to 55 degrees then the 3rd segment dissappears. how to solve it ?
You must redraw all in steps. Imagine it as cartoon and manage every picture. You need some timer which increases and calls your paint routine.
Meta code for it:
//preparing code //get DC and so on... //get step int step = ticker % STEPCOUNT; switch( step ) { case 0: //draw step 0 break; case 1://draw step 0 break; // and so on ... } //cleanup ...
这篇关于如何在运行时覆盖其他角度弧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!