public final class ShapeUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Shape |
generatePolygon(int sides,
int outsideRadius,
boolean normalize)
Generates a polygon with an inside radius of 0.
|
static Shape |
generatePolygon(int sides,
int outsideRadius,
int insideRadius)
Generates a polygon
|
static Shape |
generatePolygon(int sides,
int outsideRadius,
int insideRadius,
boolean normalize)
Generates a polygon
|
static Shape |
generateShapeFromText(Font font,
char ch) |
static Shape |
generateShapeFromText(Font font,
String string) |
static Shape |
mergeClip(Graphics g,
Shape clip)
Sets the clip on a graphics object by merging a supplied clip with the existing one.
|
public static Shape generatePolygon(int sides, int outsideRadius, boolean normalize)
sides
- number of sidesoutsideRadius
- the outside radiusnormalize
- normalizepublic static Shape generatePolygon(int sides, int outsideRadius, int insideRadius, boolean normalize)
sides
- number of sidesoutsideRadius
- the outside radiusinsideRadius
- the inside radiusnormalize
- normalizepublic static Shape generatePolygon(int sides, int outsideRadius, int insideRadius)
sides
- number of sidesoutsideRadius
- the outside radiusinsideRadius
- the inside radiuspublic static Shape generateShapeFromText(Font font, char ch)
font
- the fontch
- a single characterpublic static Shape generateShapeFromText(Font font, String string)
font
- the fontstring
- the text stringpublic static Shape mergeClip(Graphics g, Shape clip)
g
- the graphics object to updateclip
- a new clipping region to add to the graphics clip.null
if the current clip is null
.NullPointerException
- if any parameter is null
Copyright © 2013. All Rights Reserved.