Fast library to replace CDC vector graphics

拟墨画扇 提交于 2019-12-06 16:13:08

I have once evaluated FastGraph (http://www.fastgraph.com) for a project. I liked it in the small test programs I wrote, it was very fast. We ended up not using it for external reasons (nothing to do with the libraries that I evaluated) so I don't have more practical experience.

I think DirectX or SDL will suit your needs. They are designed for 3D but work for 2D as well. Both support Windows CE / Mobile and SDL is also available for a bunch of non-Microsoft OS.

Unfortunately direct compatibility with GDI is not supported in the libraries. But you can do the trick by creating a converter class, which will accept all output graphics from your GDI designed application classes and convert the format to fit the needs of DirectX or SDL classes (depending what do you want to use).

Personally I made such converter class once. I had a game written for Pocket PC, using SDL and I needed to port it to Palm device. There I had to use different graphics library (I don't remember the name of the lib now) but I succeeded to port all SDL functions output to the format needed by the other lib. I needed to change my application to call the converter (wrapper) functions, which forwarder the call to Palm or Pocket PC library, depending on which device it is currently running. So I think you can do the same for converting GDI -> DirectX or GDI -> SDL.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!