开发者

Drawing 30fps chart in Windows Forms

I'd like to draw a high-framerate (30fps+) graph/chart in a Windows Forms app.

How?

Windows Forms gets TERRIBLE frame rates drawing a clear-background drawing over a window.

(I come from开发者_运维百科 the land of GNU, so I apologize if this is obvious.)


If you're using Windows Forms (as said in your question):

If you need to get >30FPS, you'll probably need to change to a different technology. GDI+ drawing is not too efficient.

DirectX would work well for this. You can do the charting in Direct3D using DirectX embedded in a Window. SlimDX is a good way to do this from C#.

That being said, you tagged this with WPF - if you're using WPF, everything is retained mode graphics, so there should be no "clear-background drawing" required. You would just put in the chart elements as needed. In that case, 30FPS should be doable.


Running full tilt I get about 180FPS using a System::Windows::Forms::DataVisualization::Charting::Chart plotting 128bins of an FFT using a 'FastLine' style for the series of data. That's running on an Intel Core 2 Duo (2.53Ghz) IBM Thinkpad.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜