Summary

In this chapter, we covered graphics programming in Java 2D, and you saw that the vast majority of graphics applications in Java 2D follow a basic three step recipe—obtain a Graphics2D object, set the context, and render something. You should always consider the relationship between user space and device space when learning advanced features of the platform. The rest is straightforward but does require a knowledge of the vast array of state attributes that can be combined to produce the desired graphics effect as well as how to produce the necessary geometry.

We will next look into buffered imaging and the immediate mode imaging model, which, other than printing, forms the other major part of the Java 2D API.

Get Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.