2011-06-14 4 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 
} 
관련 문제