Graphics?

Hello, I've just started using c++ and I'd like to draw some shapes to a canvas. Which is the best way to do this?

I've used Java to do this before, it was very easy to just create some swing components and override their paint() method. Is there any equivalent library in c++?

I've looked into qt but am very confused about this "qt application" stuff...

EDIT: Also I'm using Ubuntu - It seems this makes a difference from what I've read..
Last edited on
Try a media library such as SFML ( http://www.sfml-dev.org/ ), SDL ( http://www.libsdl.org/ ) or Allegro ( http://alleg.sourceforge.net/ ), that is, if your interested in programming a game or doing simple graphical stuff. If you want full blown GUI applications, something like QT or wxWidgets would be better.
SDL and SFML aren't really designed to play with graphics primatives like lines, and the like.

Since you are on Linux, you might as well check out GTK+ (or GTKmm for C++) and Cairo.

Tutorials to get started:
http://zetcode.com/tutorials/cairographicstutorial/

Hope this helps.
OpenGL
Topic archived. No new replies allowed.