开发者

C++ Graphic Drawing Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

开发者_如何学C Improve this question

Does anyone know what's the best graphic drawing library for C++, I want a lib that can draw basic shapes and can make image editing, gradients and vector or 3D would be great to.

The windows drawing functions are complicated and are not very advanced.


May I suggest using Cairo?

This vector library is very fast, verbose and powerful! Just look at those pretty examples!

There's even integration with OpenGL if you need vectorized 3D textures!


I tested AGG, Cairo, GDI+ and Quartz (for Mac).

I think Quartz is the best, but is available (as long as I know) for Mac only.

AGG is poweful, but is not well documented. The developer decided to reinvent the wheel, and made his own doc system, instead of using something standard like doxygen. There are good tutorials for basic understanding, but when you dig deeper you find API documentation lacking, imprecise or incomplete.

GDI+ is pretty basic compared to the others, and is available for Windows only.

As a result, I think the best choice is probably Cairo (unless you can choose to develop for Mac only). It's well documented, the code is clean, and is fast and powerful.


Check out CImg Library.

CImg stands for "Cool Image" : It is easy to use and efficient. It's a very pleasant toolbox to code image processing stuffs in C++, and potentially covers a wide range of image processing applications.


Graphics libraries OpenGL, DirectX and game engines such as Ogre3D may be too low level for tasks like drawing shapes and gradients.

Maybe you should take a look at Cairo as mentioned above (http://cairographics.org/), or simply at Qt which has a pretty complete and efficient drawing module (http://qt.nokia.com/doc/4.5/examples.html#graphics-view) and allows high level (GraphicsScene & GraphicsView) and low level (OpenGL) drawing.


For 2D drawing, SFML provides a nice API.

See some of the quality tutorials to learn more.


DirectX and OpenGL are two options here. They're both complicated though.


Though meant for 3D you can get to do 2D stuff with Ogre3D

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜