Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Graphic Drawing Library [closed]

Tags:

c++

drawing

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.

like image 741
Andrei Avatar asked Oct 22 '09 21:10

Andrei


People also ask

What is Cairo linux?

Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output.

How can I draw a circle in C without graphics?

To understand the following code imagine you have a square graph paper on your table. The paper extends from x = -RAD to x = +RAD, and from y = -RAD to y = +RAD. Let a circle be drawn with its center at (0, 0). Start scanning with your eye from the lower left corner (to do this we have run a nested for-loop below).

How do you draw a line in C++ without graphics?

Show activity on this post. I looked at your 'c' question. std::cout << Ansi_t::clrscr() << std::flush; // clears the screen std::cout << Ansi_t::gotoRC(5, 25) << '*' << std::flush; // position the cursor, and output a single 'dot': Now use this to draw a line, etc.


2 Answers

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!

like image 98
LiraNuna Avatar answered Sep 19 '22 15:09

LiraNuna


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.

like image 31
Fabio Ceconello Avatar answered Sep 17 '22 15:09

Fabio Ceconello