|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.erichseifert.gral.util.GraphicsUtils
public abstract class GraphicsUtils
Abstract class that contains utility functions for working with graphics. For example, this includes font handling.
Constructor Summary | |
---|---|
GraphicsUtils()
|
Method Summary | |
---|---|
static void |
drawPaintedShape(Graphics2D graphics,
Shape shape,
Paint paint,
Rectangle2D paintBounds,
Stroke stroke)
Draws a filled Shape with the specified Paint object. |
static void |
fillPaintedShape(Graphics2D graphics,
Shape shape,
Paint paint,
Rectangle2D paintBounds)
Fills a Shape with the specified Paint object. |
static TextLayout |
getLayout(String text,
Font font)
Returns the layout for the specified text with the specified font. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphicsUtils()
Method Detail |
---|
public static TextLayout getLayout(String text, Font font)
text
- Text to be displayed.font
- Font of the Text.
public static void fillPaintedShape(Graphics2D graphics, Shape shape, Paint paint, Rectangle2D paintBounds)
graphics
- Graphics to be painted into.shape
- Shape to be filled.paint
- Paint to be used.paintBounds
- Optional bounds describing the painted area.public static void drawPaintedShape(Graphics2D graphics, Shape shape, Paint paint, Rectangle2D paintBounds, Stroke stroke)
graphics
- Graphics to be painted into.shape
- Shape to be filled.paint
- Paint to be used.paintBounds
- Optional bounds describing the painted area.stroke
- Stroke to be used for outlines.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |