Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.sl.draw
Class DrawTextShape

    java.lang.Object
      org.apache.poi.sl.draw.DrawShape
          org.apache.poi.sl.draw.DrawSimpleShape
              org.apache.poi.sl.draw.DrawTextShape

All Implemented Interfaces:
  Drawable

Direct Known Subclasses:
  DrawAutoShape

    public class DrawTextShape

extends DrawSimpleShape

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.poi.sl.draw.Drawable
`Drawable.DrawableHint`

Field Summary

Fields inherited from class org.apache.poi.sl.draw.DrawShape
`shape`

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
`DrawTextShape(TextShape<?,?> shape)`

Method Summary
`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

Methods inherited from class org.apache.poi.sl.draw.DrawSimpleShape
`computeOutlines, draw, drawDecoration, drawShadow, getCustomGeometry, getCustomGeometry, getHeadDecoration, getStroke, getTailDecoration`

Methods inherited from class org.apache.poi.sl.draw.DrawShape
`applyTransform, getAnchor, getAnchor, getStroke, isHSLF`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DrawTextShape

    public DrawTextShape(TextShape<?,?> shape)

Method Detail

### drawContent

    public void drawContent(java.awt.Graphics2D graphics)

  Description copied from interface: `Drawable`
  draw any content within this shape (image, text, etc.).

  Specified by:
    `drawContent` in interface `Drawable`
  Overrides:
    `drawContent` in class `DrawShape`
  Parameters:
    `graphics` - the graphics to draw into

### drawParagraphs

    public double drawParagraphs(java.awt.Graphics2D graphics,
                                 double x,
                                 double y)

  paint the paragraphs starting from top left (x,y)

  Returns:
    the vertical advance, i.e. the cumulative space occupied by the text

### getTextHeight

    public double getTextHeight()

  Compute the cumulative height occupied by the text

  Returns:
    the height in points

### getTextHeight

    public double getTextHeight(java.awt.Graphics2D oldGraphics)

  Compute the cumulative height occupied by the text

  Parameters:
    `oldGraphics` - the graphics context, which properties are to be copied, may be null
  Returns:
    the height in points

### getShape

    protected TextShape<?,? extends TextParagraph<?,?,? extends TextRun>> getShape()

  Overrides:
    `getShape` in class `DrawSimpleShape`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.