org.jdesktop.swingx.util
Class ShapeUtils
java.lang.Object
org.jdesktop.swingx.util.ShapeUtils
public final class ShapeUtils
- extends Object
- Author:
- joshy
Method Summary |
static Shape |
generatePolygon(int sides,
int outsideRadius,
boolean normalize)
|
static Shape |
generatePolygon(int sides,
int outsideRadius,
int insideRadius)
|
static Shape |
generatePolygon(int sides,
int outsideRadius,
int insideRadius,
boolean normalize)
|
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
generatePolygon
public static Shape generatePolygon(int sides,
int outsideRadius,
boolean normalize)
generatePolygon
public static Shape generatePolygon(int sides,
int outsideRadius,
int insideRadius,
boolean normalize)
generatePolygon
public static Shape generatePolygon(int sides,
int outsideRadius,
int insideRadius)
generateShapeFromText
public static Shape generateShapeFromText(Font font,
char ch)
generateShapeFromText
public static Shape generateShapeFromText(Font font,
String string)
mergeClip
public static Shape mergeClip(Graphics g,
Shape clip)
- 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
null
if the current clip is null
.
- Throws:
NullPointerException
- if any parameter is null
Copyright © 2012. All Rights Reserved.