public final class GraphicsUtils extends java.lang.Object
|Modifier and Type||Method and Description|
Converts a rendered image to a
Returns a shape that is (more or less) equivalent to the supplied shape.
Creates a polygon from the specified
public static java.awt.Shape copyOf(java.awt.Shape shape)
Polygon) the copy will be an instance of that class. For other shapes, a
Path2Dcontaining the outline of the shape is returned.
shape- the shape (
public static java.awt.geom.GeneralPath createPolygon(int xPoints, int yPoints, int nPoints, boolean close)
xPoints- the x-points.
yPoints- the y-points.
nPoints- the number of points to use for the polyline.
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.