Any time I embark on a project that requires some rendering of primitive shapes and lines, I usually turn to Java because it's just so easy. For my latest project, I decided I might like to learn another API similar to but not Java Graphics2D. I would preferably like something that will work with C++ on Linux. Does anybody have any good recommendations for me? Thanks!
Anti-Grain geometry gives high quality 2D rendering from path and font primitives, is a good example of idiomatic use of templates in C++, and looks fantastic. It has more documentation on the algorithms than on the API, so be prepared to look at the examples for how to use it. It requires some OS specific code to take the in-memory bitmap and blit it onto the screen. The other disadvantage is that when you next look at Java 2D or GDI+ applications you'll think Ewww as they're so badly rendered.
Cairo graphics is a 2D library that's cross-platform. It is written in C, though a C++ wrapper exists (cairomm). It's under a LGPL license.
I suspect that you aren't goning to use raw X11 for windows and input, so my suggestion would depend on the GUI toolkit you plan to use.
Qt has its own painting engine. You can paint directly on to windows or widgets, or you can paint onto a QPicture, which allows you to both display, print and save the result easily. For more complex scenes, you can turn to QGraphicsScene.
With gtk, it's more common to use cairo, already mentioned by Jeff Foster