You are on page 1of 1

Documentation

Download Ebooks
Download JDK
Search Java Tutorials
Hide TOC

The Java Tutorials


Advanced Topics in
Java2D
Transforming Shapes,
Text, and Images
Clipping the Drawing
Region
Compositing Graphics
Controlling Rendering
Quality
Constructing Complex
Shapes from Geometry
Primitives
Supporting User
Interaction

Previous Trail Next

Home Page > 2D Graphics

Lesson: Advanced Topics in Java2D


This lesson shows you how to use Graphics2D to display graphics with fancy outline and fill styles, transform graphics when they are rendered,
constrain rendering to a particular area, and generally control the way graphics look when they are rendered. You'll also learn how to create complex
Shape objects by combining simple ones and how to detect when the user clicks on a displayed graphics primitive. These topics are discussed in the
following sections:

Transforming Shapes, Text, and Images


This section shows you how to modify the default transformation so that objects are translated, rotated, scaled, or sheared when they are rendered.

Clipping the Drawing Region


You can use any shape as a clipping path--the area within which rendering takes place.

Compositing Graphics
This section illustrates the various compositing styles supported by AlphaComposite and shows you how to set the compositing style in the
Graphics2D rendering context.

Controlling Rendering Quality


This section describes the rendering hints that Graphics2D supports and shows you how to specify your preference in the trade-off between rendering
quality and speed.

Constructing Complex Shapes from Geometry Primitives


This section shows you how to perform boolean operations on Shape objects using the Area class.

Supporting User Interaction


This section shows you how to perform hit detection on graphics primitives.

Previous Trail Next

Your use of this page and all the material on pages under "The Java Tutorials" banner is subject to these legal notices.
Copyright 1995, 2015 Oracle and/or its affiliates. All rights reserved.

Problems with the examples? Try Compiling and Running the Examples: FAQs.
Complaints? Compliments? Suggestions? Give us your feedback.

You might also like