Package org.apache.poi.sl.draw
Interface Drawable
- All Known Implementing Classes:
DrawAutoShape
,DrawBackground
,DrawConnectorShape
,DrawFreeformShape
,DrawGraphicalFrame
,DrawGroupShape
,DrawMasterSheet
,DrawNothing
,DrawPictureShape
,DrawShape
,DrawSheet
,DrawSimpleShape
,DrawSlide
,DrawTableShape
,DrawTextBox
,DrawTextFragment
,DrawTextParagraph
,DrawTextShape
public interface Drawable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Drawable.DrawableHint
The Common SL Draw API works sometimes cascading, but there are places where the current slide context need to be evaluated, e.g.static final Drawable.DrawableHint
DrawFactory
which will be used to draw objects into this graphics contextstatic final Drawable.DrawableHint
Key for a font fallback map of typeMap<String,String>
which maps the original font family (key) to the fallback font family (value).static final Drawable.DrawableHint
Use this object to resolve unknown / missing fonts when rendering slides.static final Drawable.DrawableHint
Key for a font map of typeMap<String,String>
which maps the original font family (key) to the mapped font family (value)static final Drawable.DrawableHint
PathGradientPaint needs the shape to be set.static final Drawable.DrawableHint
static final Drawable.DrawableHint
Key will be internally used to store affine transformation temporarily within group shapesstatic final Drawable.DrawableHint
static final Drawable.DrawableHint
Use a custom image renderer of an instance ofImageRenderer
static final Drawable.DrawableHint
Internal key for caching the preset geometriesstatic final int
static final int
draw text viaTextLayout.draw(java.awt.Graphics2D, float, float)
static final Drawable.DrawableHint
how to render text:TEXT_AS_CHARACTERS
(default) means to draw viaGraphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyTransform
(Graphics2D graphics) Apply 2-D transforms before drawing this shape.void
draw
(Graphics2D graphics) Draw this shape into the supplied canvasvoid
drawContent
(Graphics2D graphics) draw any content within this shape (image, text, etc.).
-
Field Details
-
DRAW_FACTORY
DrawFactory
which will be used to draw objects into this graphics context -
GROUP_TRANSFORM
Key will be internally used to store affine transformation temporarily within group shapes -
IMAGE_RENDERER
Use a custom image renderer of an instance ofImageRenderer
-
TEXT_RENDERING_MODE
how to render text:TEXT_AS_CHARACTERS
(default) means to draw viaGraphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
. This mode draws text as characters. Use it if the target graphics writes the actual character codes instead of glyph outlines (PDFGraphics2D, SVGGraphics2D, etc.)TEXT_AS_SHAPES
means to render viaTextLayout.draw(java.awt.Graphics2D, float, float)
. This mode draws glyphs as shapes and provides some advanced capabilities such as justification and font substitution. Use it if the target graphics is an image. -
GRADIENT_SHAPE
PathGradientPaint needs the shape to be set. It will be achieved through setting it in the rendering hints -
PRESET_GEOMETRY_CACHE
Internal key for caching the preset geometries -
TEXT_AS_CHARACTERS
static final int TEXT_AS_CHARACTERS- See Also:
-
TEXT_AS_SHAPES
static final int TEXT_AS_SHAPESdraw text viaTextLayout.draw(java.awt.Graphics2D, float, float)
- See Also:
-
FONT_HANDLER
Use this object to resolve unknown / missing fonts when rendering slides. The font handler must be of typeDrawFontManager
.In case a
FONT_HANDLER
is register,FONT_FALLBACK
andFONT_MAP
are ignored -
FONT_FALLBACK
Key for a font fallback map of typeMap<String,String>
which maps the original font family (key) to the fallback font family (value). In case there is also aFONT_MAP
registered, the original font is first mapped via the font_map and then the fallback font is determined -
FONT_MAP
Key for a font map of typeMap<String,String>
which maps the original font family (key) to the mapped font family (value) -
GSAVE
-
GRESTORE
-
CURRENT_SLIDE
The Common SL Draw API works sometimes cascading, but there are places where the current slide context need to be evaluated, e.g. when slide numbers are printed. In this situation we need to have a way to access the current slide
-
-
Method Details
-
applyTransform
Apply 2-D transforms before drawing this shape. This includes rotation and flipping.- Parameters:
graphics
- the graphics whos transform matrix will be modified
-
draw
Draw this shape into the supplied canvas- Parameters:
graphics
- the graphics to draw into
-
drawContent
draw any content within this shape (image, text, etc.).- Parameters:
graphics
- the graphics to draw into
-