public class GraphicsUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
convertRenderedImage(java.awt.image.RenderedImage img)
Converts a rendered image to a
BufferedImage . |
static java.awt.Shape |
copyOf(java.awt.Shape shape)
Returns a shape that is more or less equivalent to the supplied shape.
|
static java.awt.geom.GeneralPath |
createPolygon(int[] xPoints,
int[] yPoints,
int nPoints,
boolean close)
Creates a polygon for from the specified
x and
y coordinates. |
public static java.awt.Shape copyOf(java.awt.Shape shape)
shape
- the shape (null
not permitted).public static java.awt.geom.GeneralPath createPolygon(int[] xPoints, int[] yPoints, int nPoints, boolean close)
x
and
y
coordinates.xPoints
- the x-points.yPoints
- the y-points.nPoints
- the number of points to use for the polyline.close
- closed?public static java.awt.image.BufferedImage convertRenderedImage(java.awt.image.RenderedImage img)
BufferedImage
. This utility
method has come from a forum post by Jim Moore at:
img
- the rendered image.