Package org.bzdev.gio

Class SurrogateGraphics2D

java.lang.Object
java.awt.Graphics
java.awt.Graphics2D
org.bzdev.gio.SurrogateGraphics2D

public class SurrogateGraphics2D extends Graphics2D
Graphics2D class providing a minimal implementation. When this class is used, it will typically be used to create a minimal implementation of Graphics2D that will be passed to the constructor Graphics2DRecorder(Graphics2D). A typical use is to record a series of graphics operation that will be "replayed" inside a method such as JComponent.paintComponent(Graphics).

The implementation uses a buffered image for some operations to ensure that the behavior is the same as that for the Java class library, but the methods that draw objects, with a few exceptions involving the explicit use of image observers, do nothing.