Easy to use drawing library in c or c++?
Asked Answered
D

7

10

I'd need a very easy to use drawing c or c++ library. This means that I don't need to put buttons, frames or anything else in there, but I need just to draw points, circles, lines on a graphic window. Is that possible?

Derose answered 15/6, 2011 at 15:27 Comment(2)
What is "c/c++"?Shoat
I wish I could vote down comments. Is it so hard to believe that someone would be equally happy with a C or C++ library?Norvan
A
11

Cairo is a nice option if you are looking for ease of usage.

Achates answered 15/6, 2011 at 15:32 Comment(1)
... and it also has a C++ wrapper called cairomm.Suzerainty
M
8

You can use one of the many C++ creative coding frameworks:

Matronage answered 15/6, 2011 at 15:30 Comment(0)
M
2

If you are working on Windows, try Direct2D, it's very powerful and equally simple to use.

More info at : http://msdn.microsoft.com/en-us/library/dd370990%28v=vs.85%29.aspx

Moleskins answered 15/6, 2011 at 15:55 Comment(0)
O
2

SDL is pretty nice. If you really want to get involved, Direct3D and OpenGL are probably the best options.

Octonary answered 15/6, 2011 at 20:31 Comment(1)
Trouble with SDL is that, AFAIK, it has few geometry drawing operations and you'll likely have to fall back to setPixel. That said, pygame.org/docs/ref/draw.html does have what's needed, maybe there's a C/C++ library based on SDL somewhere that does the same?Libelous
F
1

Try SFML: http://www.sfml-dev.org/

Flor answered 15/6, 2011 at 15:31 Comment(0)
L
1

You should be a little more specific:

  1. What platforms do you want to target?

  2. What do you exactly mean by "easy to use"?


If you are using Windows and just want to learn the concepts of computer graphics, just use the Windows GDI.

If you want to learn computer graphics for mobile devices, use OpenGL. It is a bit harder to use than the Windows GDI, because it is a lower level API, but it is more powerful.

Limemann answered 15/6, 2011 at 15:34 Comment(0)
M
0

Anti-Grain Geometry has some really nice results. It's not difficult to use. It's a C++ library and I don't know if there are C bindings.

Mog answered 15/6, 2011 at 15:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.