O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rendering 101

Java 2D's Graphics2D methods render shapes, text, and images onto a drawing surface. These shapes can be constructed, either from Graphics drawing methods (such as drawArc) or from objects created from Java 2D's geometry classes (such as Ellipse). (These classes will be explored in an upcoming section.)

In the past, you could only choose one rendering state attribute: the current color. This color attribute would subsequently be used when drawing a shape or text. Furthermore, it would be used to fill a solid shape. In contrast, Java 2D's Graphics2D context maintains several state attributes. These state attributes can be divided into the following categories: rendering hint, stroke, paint (also known as fill), transform, clipping ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required