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
static class Drawable.DrawableHint
           
 
Field Summary
static Drawable.DrawableHint DRAW_FACTORY
          DrawFactory which will be used to draw objects into this graphics context
static Drawable.DrawableHint FONT_FALLBACK
           
static Drawable.DrawableHint FONT_HANDLER
          Use this object to resolve unknown / missing fonts when rendering slides
static Drawable.DrawableHint FONT_MAP
           
static Drawable.DrawableHint GRADIENT_SHAPE
          PathGradientPaint needs the shape to be set.
static Drawable.DrawableHint GRESTORE
           
static Drawable.DrawableHint GROUP_TRANSFORM
          Key will be internally used to store affine transformation temporarily within group shapes
static Drawable.DrawableHint GSAVE
           
static Drawable.DrawableHint IMAGE_RENDERER
          Use a custom image renderer of an instance of ImageRenderer
static Drawable.DrawableHint PRESET_GEOMETRY_CACHE
          Internal key for caching the preset geometries
static int TEXT_AS_CHARACTERS
          draw text via Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float)
static int TEXT_AS_SHAPES
          draw text via TextLayout.draw(java.awt.Graphics2D, float, float)
static Drawable.DrawableHint TEXT_RENDERING_MODE
          how to render text: TEXT_AS_CHARACTERS (default) means to draw via Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float).
 
Method Summary
 void applyTransform(java.awt.Graphics2D graphics)
          Apply 2-D transforms before drawing this shape.
 void draw(java.awt.Graphics2D graphics)
          Draw this shape into the supplied canvas
 void drawContent(java.awt.Graphics2D graphics)
          draw any content within this shape (image, text, etc.).
 

Field Detail

DRAW_FACTORY

static final Drawable.DrawableHint DRAW_FACTORY
DrawFactory which will be used to draw objects into this graphics context


GROUP_TRANSFORM

@Internal
static final Drawable.DrawableHint GROUP_TRANSFORM
Key will be internally used to store affine transformation temporarily within group shapes


IMAGE_RENDERER

static final Drawable.DrawableHint IMAGE_RENDERER
Use a custom image renderer of an instance of ImageRenderer


TEXT_RENDERING_MODE

static final Drawable.DrawableHint TEXT_RENDERING_MODE
how to render text: TEXT_AS_CHARACTERS (default) means to draw via Graphics2D.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 via TextLayout.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

static final Drawable.DrawableHint GRADIENT_SHAPE
PathGradientPaint needs the shape to be set. It will be achieved through setting it in the rendering hints


PRESET_GEOMETRY_CACHE

static final Drawable.DrawableHint PRESET_GEOMETRY_CACHE
Internal key for caching the preset geometries


TEXT_AS_CHARACTERS

static final int TEXT_AS_CHARACTERS
draw text via Graphics2D.drawString(java.text.AttributedCharacterIterator, float, float)

See Also:
Constant Field Values

TEXT_AS_SHAPES

static final int TEXT_AS_SHAPES
draw text via TextLayout.draw(java.awt.Graphics2D, float, float)

See Also:
Constant Field Values

FONT_HANDLER

static final Drawable.DrawableHint FONT_HANDLER
Use this object to resolve unknown / missing fonts when rendering slides


FONT_FALLBACK

static final Drawable.DrawableHint FONT_FALLBACK

FONT_MAP

static final Drawable.DrawableHint FONT_MAP

GSAVE

static final Drawable.DrawableHint GSAVE

GRESTORE

static final Drawable.DrawableHint GRESTORE
Method Detail

applyTransform

void applyTransform(java.awt.Graphics2D graphics)
Apply 2-D transforms before drawing this shape. This includes rotation and flipping.

Parameters:
graphics - the graphics whos transform matrix will be modified

draw

void draw(java.awt.Graphics2D graphics)
Draw this shape into the supplied canvas

Parameters:
graphics - the graphics to draw into

drawContent

void drawContent(java.awt.Graphics2D graphics)
draw any content within this shape (image, text, etc.).

Parameters:
graphics - the graphics to draw into


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