Windows CE、MFC 中 MoveTo 和 LineTo 的替代

发布于 2024-10-08 22:59:50 字数 209 浏览 6 评论 0原文

您好,我正在开发一些高分辨率显示功能,其中必须绘制垂直线,我正在使用 Moveto() 和 lineTO() ,但需要花费很多时间... 谁能建议我,我们可以用什么来代替它...来优化性能...

看到的场景是,为了绘制 100 条垂直线,需要 84 毫秒的时间,我们需要将其减少到 5 毫秒左右。 。

请向我推荐任何替代方案

谢谢,

穆克什

Hi i am working on some high resolution display features in which have to draw the vertical line , i am using Moveto() and lineTO() , but it is much time taking...
can anyone suggest me , what we can use instead of it ...to optimize the performance...

see the scene is , in order to draw 100 Vertical lines it is taking 84ms time, we need to reduce it to 5 ms something..

please refer me any alternate fot that.

Thanks,

Mukesh

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

浪菊怪哟 2024-10-15 22:59:50

第一步可能是尝试 CDC::PolyPolyline。这是迄今为止最容易进行的修改,而且可能就足够了。此后决定下一步可能会更加困难。最明显的可能性是 GDI+、OpenGL 和 DirectX 图形。我按照使用复杂性的递增顺序列出了这些内容,以及它们为您提供所需速度提升的可能性。

The first step would probably be to try CDC::PolyPolyline. It's by far the easiest modification to make, and might be sufficient. Deciding on the next step after that will probably be much more difficult. The obvious possibilities would be GDI+, OpenGL, and DirectX Graphics. I've listed those in approximately increasing order of complexity to use, and likelihood that they'll give you the speed increase you want.

孤独岁月 2024-10-15 22:59:50

如果这些垂直线实际上形成了矩形,还有一个 矩形 函数可能对您有用。

There is also Rectangle function that may be useful to you if those vertical lines actually make rectangles.

如何视而不见 2024-10-15 22:59:50

我认为 100 条线不应该花那么长时间来绘制。还有什么你没有告诉我们的吗?您是否直接在屏幕 DC 上绘图?您是否尝试过绘制到屏幕外位图,然后 blt-ing 到屏幕?

I don't think that 100 lines should take that long to draw. Is there something else that you aren't telling us. Are you drawing direct to a screen DC? Have you tried drawing to offscreen bitmap and then blt-ing to the screen?

爱情眠于流年 2024-10-15 22:59:50

我建议你使用 GDI+,它应该更快,好吧,你需要尝试一下它是否真的适合你的需要:-)

这里有一个将 GDI+ 与 MFC 集成的链接: 将 GDI+ 与 MFC 或本机 C/C++ 结合使用

I suggest you use GDI+ which should be faster, well, you need to try if it really fits your need :-)

Here is a link to integrate GDI+ with MFC: Using GDI+ with MFC or native C/C++

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文