public class DrawTextShape extends DrawSimpleShape
Drawable.DrawableHint
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
Constructor and Description |
---|
DrawTextShape(TextShape<?,?> shape) |
Modifier and Type | Method and Description |
---|---|
void |
drawContent(java.awt.Graphics2D graphics)
draw any content within this shape (image, text, etc.).
|
double |
drawParagraphs(java.awt.Graphics2D graphics,
double x,
double y)
paint the paragraphs starting from top left (x,y)
|
protected TextShape<?,? extends TextParagraph<?,?,? extends TextRun>> |
getShape() |
double |
getTextHeight()
Compute the cumulative height occupied by the text
|
double |
getTextHeight(java.awt.Graphics2D oldGraphics)
Compute the cumulative height occupied by the text
|
computeOutlines, draw, drawDecoration, drawShadow, getCustomGeometry, getCustomGeometry, getHeadDecoration, getStroke, getTailDecoration
applyTransform, getAnchor, getAnchor, getStroke
public DrawTextShape(TextShape<?,?> shape)
public void drawContent(java.awt.Graphics2D graphics)
Drawable
drawContent
in interface Drawable
drawContent
in class DrawShape
graphics
- the graphics to draw intopublic double drawParagraphs(java.awt.Graphics2D graphics, double x, double y)
public double getTextHeight()
public double getTextHeight(java.awt.Graphics2D oldGraphics)
oldGraphics
- the graphics context, which properties are to be copied, may be nullprotected TextShape<?,? extends TextParagraph<?,?,? extends TextRun>> getShape()
getShape
in class DrawSimpleShape
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.