Class GraphicsUtils
java.lang.Object
com.orsonpdf.util.GraphicsUtils
Utility methods for shapes and images.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImageConverts a rendered image to aBufferedImage.static ShapeReturns a shape that is more or less equivalent to the supplied shape.static GeneralPathcreatePolygon(int[] xPoints, int[] yPoints, int nPoints, boolean close) Creates a polygon for from the specifiedxandycoordinates.
-
Constructor Details
-
GraphicsUtils
private GraphicsUtils()
-
-
Method Details
-
copyOf
-
createPolygon
Creates a polygon for from the specifiedxandycoordinates.- 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.
-