## Uses of Class
java.awt.Graphics2D

Packages that use Graphics2D
Package | Description
--- | ---
java.awt | Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font | Provides classes and interface relating to fonts.
java.awt.image | Provides classes for creating and modifying images.

### Uses of Graphics2D in java.awt

Methods in java.awt that return Graphics2D
Modifier and Type | Method and Description
--- | ---
`Graphics2D` | SplashScreen.`createGraphics()` Creates a graphics context (as a `Graphics2D` object) for the splash screen overlay image, which allows you to draw over the splash screen.
`abstract Graphics2D` | GraphicsEnvironment.`createGraphics(BufferedImage img)` Returns a `Graphics2D` object for rendering into the specified `BufferedImage`.

### Uses of Graphics2D in java.awt.font

Methods in java.awt.font with parameters of type Graphics2D
Modifier and Type | Method and Description
--- | ---
`void` | TextLayout.`draw(Graphics2D g2, float x, float y)` Renders this `TextLayout` at the specified location in the specified `Graphics2D` context.
`void` | ShapeGraphicAttribute.`draw(Graphics2D graphics, float x, float y)` Renders this `GraphicAttribute` at the specified location.
`void` | ImageGraphicAttribute.`draw(Graphics2D graphics, float x, float y)` Renders this `GraphicAttribute` at the specified location.
`abstract void` | GraphicAttribute.`draw(Graphics2D graphics, float x, float y)` Renders this `GraphicAttribute` at the specified location.

### Uses of Graphics2D in java.awt.image

Methods in java.awt.image that return Graphics2D
Modifier and Type | Method and Description
--- | ---
`abstract Graphics2D` | VolatileImage.`createGraphics()` Creates a `Graphics2D`, which can be used to draw into this `VolatileImage`.
`Graphics2D` | BufferedImage.`createGraphics()` Creates a `Graphics2D`, which can be used to draw into this `BufferedImage`.

Copyright © 1993, 2017, Oracle and/or its affiliates. All rights reserved.