如何在运行时覆盖其他角度弧 [英] How to overwrite one angle arc over other during runtime

查看:80
本文介绍了如何在运行时覆盖其他角度弧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用角度弧将圆分成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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆