Package org.apache.poi.sl.draw
Class DrawTextFragment
java.lang.Object
org.apache.poi.sl.draw.DrawTextFragment
- All Implemented Interfaces:
Drawable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.poi.sl.draw.Drawable
Drawable.DrawableHint -
Field Summary
Fields inherited from interface org.apache.poi.sl.draw.Drawable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTransform(Graphics2D graphics) Apply 2-D transforms before drawing this shape.voiddraw(Graphics2D graphics) Draw this shape into the supplied canvasvoiddrawContent(Graphics2D graphics) draw any content within this shape (image, text, etc.).floatfloatfloatgetWidth()voidsetPosition(double x, double y) toString()
-
Constructor Details
-
DrawTextFragment
-
-
Method Details
-
setPosition
public void setPosition(double x, double y) -
draw
Description copied from interface:DrawableDraw this shape into the supplied canvas -
applyTransform
Description copied from interface:DrawableApply 2-D transforms before drawing this shape. This includes rotation and flipping.- Specified by:
applyTransformin interfaceDrawable- Parameters:
graphics- the graphics whos transform matrix will be modified
-
drawContent
Description copied from interface:Drawabledraw any content within this shape (image, text, etc.).- Specified by:
drawContentin interfaceDrawable- Parameters:
graphics- the graphics to draw into
-
getLayout
-
getAttributedString
-
getHeight
public float getHeight()- Returns:
- full height of this text run which is sum of ascent, descent and leading
-
getLeading
public float getLeading()- Returns:
- the leading height before/after a text line
-
getWidth
public float getWidth()- Returns:
- width if this text run
-
getString
- Returns:
- the string to be painted
-
toString
-