在WPF中绘制百万点线 [英] Draw million points line in WPF

查看:146
本文介绍了在WPF中绘制百万点线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想绘制包含近1000000个点的线,并且还希望在1秒内完成此渲染。

你能否建议我如何在wpf中绘制高性能系列。



我尝试了什么:



我尝试了PolyLine,StreamGeometry并尝试了DrawingVisual,但是这些类需要几秒钟才能用50k点画线。

I want to draw the line containing nearly 1000000 points and also wants to do this rendering within 1 second.
Could you please suggest how i can draw high performance line in wpf.

What I have tried:

I tried PolyLine, StreamGeometry and also tried DrawingVisual, but these classes takes several seconds to draw line with just 50k points.

推荐答案

您可以从这里找到一些有效的方法:

c# - 使用WPF绘制数千个数据点的最佳方式? - 堆栈溢出 [ ^ ]
You may find some efficient approaches from here:
c# - Most performant way to graph thousands of data points with WPF? - Stack Overflow[^]


引用:

我想要绘制包含近1000000个点的线,并且还希望在1秒内完成此渲染。

I want to draw the line containing nearly 1000000 points and also wants to do this rendering within 1 second.



不要这样做!

相反,绘制数据1次,拍照,保存在服务器上,然后将图片发送到客户。

另一种方法是减少加速渲染的点数。


Don't do it !
Instead, draw the data 1 time, take a picture, save it on server, and just send the picture to the client.
Another way is to reduce the number of points to speedup rendering.


这篇关于在WPF中绘制百万点线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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