2011-06-14 28 views

回答

0

注意事项:必须在UI线程上绘制图表,那么您希望图表(实时还是延迟)的响应速度如何?

布局图(我在纸上做这个)来确定X和Y范围,限制等。这将帮助您清楚地了解您想要的内容。

把它放在一起没有办法测试,但这可能会让你朝着正确的方向前进。我从来没有创造过任何非常像“火花线”的东西。

Point newPoint; 
Point lastPoint; 

void SetNewPoint(Point NewPoint); 
{ 
    newPoint = NewPoint; 
    myPicBox.Refresh (); // include the Rectangle area to refresh 
} 

void myPicBox_Paint (object sender, PaintEventArgs e) 
{ 
    // grab Graphics handle 
    // paint line from lastPoint to newPoint 

    // you will have to keep a collection of points if redrawing the entire graph 
}