public class DrawShape extends Object implements Drawable
Drawable.DrawableHint| Modifier and Type | Field and Description |
|---|---|
protected Shape<?,?> |
shape |
BUFFERED_IMAGE, CACHE_IMAGE_SOURCE, CURRENT_SLIDE, DEFAULT_CHARSET, DRAW_FACTORY, EMF_FORCE_HEADER_BOUNDS, 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(Graphics2D graphics)
Apply 2-D transforms before drawing this shape.
|
void |
draw(Graphics2D graphics)
Draw this shape into the supplied canvas
|
void |
drawContent(Graphics2D graphics)
draw any content within this shape (image, text, etc.).
|
static Rectangle2D |
getAnchor(Graphics2D graphics,
PlaceableShape<?,?> shape) |
static Rectangle2D |
getAnchor(Graphics2D graphics,
Rectangle2D anchor) |
protected Shape<?,?> |
getShape() |
protected static BasicStroke |
getStroke(StrokeStyle strokeStyle) |
protected final Shape<?,?> shape
public DrawShape(Shape<?,?> shape)
public void applyTransform(Graphics2D graphics)
applyTransform in interface Drawablegraphics - the graphics whose transform matrix will be modifiedpublic void draw(Graphics2D graphics)
Drawablepublic void drawContent(Graphics2D graphics)
DrawabledrawContent in interface Drawablegraphics - the graphics to draw intopublic static Rectangle2D getAnchor(Graphics2D graphics, PlaceableShape<?,?> shape)
public static Rectangle2D getAnchor(Graphics2D graphics, Rectangle2D anchor)
protected Shape<?,?> getShape()
protected static BasicStroke getStroke(StrokeStyle strokeStyle)