public final class ImagePainter extends java.lang.Object implements ObjectPainter<java.awt.image.BufferedImage>
ObjectPainter that paints an image, filling the unit
square.| Constructor and Description |
|---|
ImagePainter() |
| Modifier and Type | Method and Description |
|---|---|
void |
paint(java.awt.Graphics2D g,
java.awt.geom.AffineTransform worldToScreen,
double w,
double h,
java.awt.image.BufferedImage image)
Perform the painting operations for the given object on the given
Graphics.
|
public void paint(java.awt.Graphics2D g,
java.awt.geom.AffineTransform worldToScreen,
double w,
double h,
java.awt.image.BufferedImage image)
ObjectPainterPainter.paint(Graphics2D, AffineTransform, double, double)
for more information about how the Graphics object is handled among
painters.paint in interface ObjectPainter<java.awt.image.BufferedImage>g - The Graphics used for paintingworldToScreen - The world-to-screen transform. This transform
encapsulates the translation, rotation and scaling of the viewer
to which this painter belongs.w - The width of the area, in screen coordinates, in which
this painter operates. This is the screen size of the viewer to
which this painter belongs.h - The height of the area, in screen coordinates, in which
this painter operates. This is the screen size of the viewer to
which this painter belongs.image - The object to paint. One has to assume that
this object may be null, in which case the
painting operation will usually be skipped.Copyright © 2019. All Rights Reserved.