java.lang.Object
org.jfree.pdf.util.GraphicsUtils
Utility methods for shapes and images.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
Converts a rendered image to aBufferedImage
.static Shape
Returns a shape that is more or less equivalent to the supplied shape.static GeneralPath
createPolygon
(int[] xPoints, int[] yPoints, int nPoints, boolean close) Creates a polygon for from the specifiedx
andy
coordinates.
-
Constructor Details
-
GraphicsUtils
private GraphicsUtils()
-
-
Method Details
-
copyOf
Returns a shape that is more or less equivalent to the supplied shape.- Parameters:
shape
- the shape (null
not permitted).- Returns:
- A copy of the shape (it may not be the same class).
-
createPolygon
Creates a polygon for from the specifiedx
andy
coordinates.- Parameters:
xPoints
- the x-points.yPoints
- the y-points.nPoints
- the number of points to use for the polyline.close
- closed?- Returns:
- A polygon.
-
convertRenderedImage
Converts a rendered image to aBufferedImage
. This utility method has come from a forum post by Jim Moore at:- Parameters:
img
- the rendered image.- Returns:
- A buffered image.
-