public class DrawShape extends java.lang.Object implements Drawable
Drawable.DrawableHint
Modifier and Type | Field and Description |
---|---|
protected Shape<?,?> |
shape |
CURRENT_SLIDE, DRAW_FACTORY, FONT_FALLBACK, FONT_HANDLER, FONT_MAP, GRADIENT_SHAPE, GRESTORE, GROUP_TRANSFORM, GSAVE, IMAGE_RENDERER, PRESET_GEOMETRY_CACHE, TEXT_AS_CHARACTERS, TEXT_AS_SHAPES, TEXT_RENDERING_MODE
Modifier and Type | Method and Description |
---|---|
void |
applyTransform(java.awt.Graphics2D graphics)
Apply 2-D transforms before drawing this shape.
|
void |
draw(java.awt.Graphics2D graphics)
Draw this shape into the supplied canvas
|
void |
drawContent(java.awt.Graphics2D graphics)
draw any content within this shape (image, text, etc.).
|
static java.awt.geom.Rectangle2D |
getAnchor(java.awt.Graphics2D graphics,
PlaceableShape<?,?> shape) |
static java.awt.geom.Rectangle2D |
getAnchor(java.awt.Graphics2D graphics,
java.awt.geom.Rectangle2D anchor) |
protected Shape<?,?> |
getShape() |
protected static java.awt.BasicStroke |
getStroke(StrokeStyle strokeStyle) |
protected final Shape<?,?> shape
public DrawShape(Shape<?,?> shape)
public void applyTransform(java.awt.Graphics2D graphics)
applyTransform
in interface Drawable
graphics
- the graphics whos transform matrix will be modifiedpublic void draw(java.awt.Graphics2D graphics)
Drawable
public void drawContent(java.awt.Graphics2D graphics)
Drawable
drawContent
in interface Drawable
graphics
- the graphics to draw intopublic static java.awt.geom.Rectangle2D getAnchor(java.awt.Graphics2D graphics, PlaceableShape<?,?> shape)
public static java.awt.geom.Rectangle2D getAnchor(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D anchor)
protected Shape<?,?> getShape()
protected static java.awt.BasicStroke getStroke(StrokeStyle strokeStyle)
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.