|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.GraphicUtils
public class GraphicUtils
The GraphicUtils is an utility class that gives access to some simple graphics operations, like an easy creating of a clipped shape or image, or painting of a border glow. Most of the code in this class is based on advices and examples in the "Java 2D Trickery: Soft Clipping".
| Constructor Summary | |
|---|---|
GraphicUtils()
|
|
| Method Summary | |
|---|---|
static BufferedImage |
createClipImage(Graphics2D g,
Shape shape)
Creates a clipped image from the given shape. |
static Shape |
createRoundedClipShape(int shapeWidth,
int shapeHeight,
int arcW,
int arcH)
Creates a rounded clipped shape with the given shapeWidth, shapeHeight, arc width and arc height. |
static void |
paintBorderGlow(Graphics2D g2,
int glowWidth,
Shape clipShape,
Color glowOuterHigh,
Color glowOuterLow)
Paints border glow over the given clipShape with the given glow high and low colors and the given glowWidth. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphicUtils()
| Method Detail |
|---|
public static Shape createRoundedClipShape(int shapeWidth,
int shapeHeight,
int arcW,
int arcH)
shapeWidth - the width of the shape to createshapeHeight - the height of the shape to createarcW - the width of the arc to use to round the corners of the
newly created shapearcH - the height of the arc to use to round the corners of the
newly created shape
public static BufferedImage createClipImage(Graphics2D g,
Shape shape)
shape - the shape from which to create the imageg - the Graphics object giving access to the graphics
device configuration
public static void paintBorderGlow(Graphics2D g2,
int glowWidth,
Shape clipShape,
Color glowOuterHigh,
Color glowOuterLow)
g2 - the Graphics object to use for paintingglowWidth - the width of the glowclipShape - the shape where to paint the glowglowOuterHigh - the color which will paint the higher glowglowOuterLow - the color which will paint the lower glow
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||