Set the Graphics2D Context…

As mentioned briefly, the graphics context is a collection of state attributes specifying properties of the rendering. State attributes are sometimes also referred to as rendering attributes. Five interfaces and several classes that are part of java.awt package represent these attributes.

The first three interfaces are relevant to most development projects and are listed in Table 3.1. Note that these interfaces are implemented in the set of classes listed in Tables 3.2 and 3.3.

Table 3.1. Commonly Used Interfaces Implemented with the Graphics2D Context
Interface Description
Composite Methods to compose a primitive over the underlying Graphics area.
Paint Methods to specify rules for generating color patterns. Extends ...

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.