Skip to Main Content
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization
book

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

by Alejandro Terrazas, John Ostuni, Michael Barlow
November 2002
Intermediate to advanced content levelIntermediate to advanced
848 pages
19h 59m
English
Sams
Content preview from Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Shape Primitives

So far we have only drawn rectangles in our examples, but there are, in fact, nine shape primitives available to us. These shapes are contained almost entirely in the java.awt.geom package and can be used to draw pretty much anything in two dimensions. All shape primitives implement the Shape interface, a set of methods for describing shapes that is part of the java.awt package. In addition, all shape primitives implement the PathIterator object that specifies the outline of the shape. Before explaining the PathIterator interface, we will introduce the shape primitives:

  • Arc2D

  • Area

  • CubicCurve2D

  • Ellipse2D

  • GeneralPath

  • Line2D

  • QuadCurve2D

  • Rectangle2D

  • RoundRectangle2D

This set of primitives can be divided into four categories based on their ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
JavaFX 9 by Example

JavaFX 9 by Example

Carl Dea, Gerrit Grunwald, José Pereda, Sean Phillips, Mark Heckler

Publisher Resources

ISBN: 0672320940Purchase book