Section 13.8 Java 2D API
• The Java 2D API (p. 581) provides advanced two-dimensional graphics capabilities.
• Class Graphics2D (p. 581)—a subclass of Graphics—is used for drawing with the Java 2D API.
• The Java 2D API’s classes for drawing shapes include Line2D.Double, Rectangle2D.Double, RoundRectangle2D.Double, Arc2D.Double and Ellipse2D.Double (p. 581).
• Class GradientPaint (p. 584) helps draw a shape in gradually changing colors—called a gradient (p. 584).
• Graphics2D method fill (p. 584) draws a filled object of any type that implements interface Shape (p. 584).
• Class BasicStroke (p. 584) helps specify the drawing characteristics of lines.
• Graphics2D method draw (p. 584) is used to draw a Shape object.
• Classes GradientPaint (p. ...
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.
Read now
Unlock full access