Class ShapeUtils
java.lang.Object
org.jdesktop.swingx.util.ShapeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ShapegeneratePolygon(int sides, int outsideRadius, boolean normalize) static ShapegeneratePolygon(int sides, int outsideRadius, int insideRadius) static ShapegeneratePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize) static ShapegenerateShapeFromText(Font font, char ch) static ShapegenerateShapeFromText(Font font, String string) static ShapeSets the clip on a graphics object by merging a supplied clip with the existing one.
-
Constructor Details
-
ShapeUtils
private ShapeUtils()Creates a new instance of ShapeUtils
-
-
Method Details
-
generatePolygon
-
generatePolygon
public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize) -
generatePolygon
-
generateShapeFromText
-
generateShapeFromText
-
mergeClip
Sets the clip on a graphics object by merging a supplied clip with the existing one. The new clip will be an intersection of the old clip and the supplied clip. The old clip shape will be returned. This is useful for resetting the old clip after an operation is performed.- Parameters:
g- the graphics object to updateclip- a new clipping region to add to the graphics clip.- Returns:
- the current clipping region of the supplied graphics object. This may return
nullif the current clip isnull. - Throws:
NullPointerException- if any parameter isnull
-