Top Inners Fields Methods
org.apache.poi.sl.draw

public Interface Drawable

Known Direct Implementers
org.apache.poi.sl.draw.DrawNothing, org.apache.poi.sl.draw.DrawShape, org.apache.poi.sl.draw.DrawSheet, org.apache.poi.sl.draw.DrawTextFragment, org.apache.poi.sl.draw.DrawTextParagraph
Imports
java.awt.Graphics2D, .RenderingHints, org.apache.poi.util.Internal

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final Drawable.DrawableHint
BUFFERED_IMAGE

Stores a reference (WEAK_REFERENCE) to the buffered image, if the rendering is based on a buffered image

public static final Drawable.DrawableHint
CACHE_IMAGE_SOURCE

A boolean value to instruct the bitmap image renderer to keep the original image bytes.

public static final Drawable.DrawableHint
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.

public static final Drawable.DrawableHint
DEFAULT_CHARSET

Sets the default charset to render text elements.

public static final Drawable.DrawableHint
DRAW_FACTORY

DrawFactory which will be used to draw objects into this graphics context

public static final Drawable.DrawableHint
EMF_FORCE_HEADER_BOUNDS

A boolean value to force the usage of the bounding box, which is specified in the EMF header.

public static final Drawable.DrawableHint
FONT_FALLBACK

Key for a font fallback map of type Map<String,String> which maps the original font family (key) to the fallback font family (value).

public static final Drawable.DrawableHint
FONT_HANDLER

Use this object to resolve unknown / missing fonts when rendering slides.

public static final Drawable.DrawableHint
FONT_MAP

Key for a font map of type Map<String,String> which maps the original font family (key) to the mapped font family (value)

public static final Drawable.DrawableHint
GRADIENT_SHAPE

PathGradientPaint needs the shape to be set.

public static final Drawable.DrawableHint
public static final Drawable.DrawableHint
GROUP_TRANSFORM

Key will be internally used to store affine transformation temporarily within group shapes

public static final Drawable.DrawableHint
public static final Drawable.DrawableHint
IMAGE_RENDERER

Use a custom image renderer of an instance of ImageRenderer

public static final Drawable.DrawableHint
PRESET_GEOMETRY_CACHE

Internal key for caching the preset geometries

public static final int
public static final int
public static final Drawable.DrawableHint

Method Summary

Modifier and TypeMethod and Description
public void
applyTransform(Graphics2D
the graphics whose transform matrix will be modified
graphics
)

Apply 2-D transforms before drawing this shape.

public void
draw(Graphics2D
the graphics to draw into
graphics
)

Draw this shape into the supplied canvas

public void
drawContent(Graphics2D
the graphics to draw into
graphics
)

draw any content within this shape (image, text, etc.).

Field Detail

BUFFERED_IMAGEback to summary
public static final Drawable.DrawableHint BUFFERED_IMAGE

Stores a reference (WEAK_REFERENCE) to the buffered image, if the rendering is based on a buffered image

CACHE_IMAGE_SOURCEback to summary
public static final Drawable.DrawableHint CACHE_IMAGE_SOURCE

A boolean value to instruct the bitmap image renderer to keep the original image bytes. Defaults to false if unset.

CURRENT_SLIDEback to summary
public static final Drawable.DrawableHint 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

DEFAULT_CHARSETback to summary
public static final Drawable.DrawableHint DEFAULT_CHARSET

Sets the default charset to render text elements. Opposed to other windows libraries in POI this simply defaults to Windows-1252. The rendering value is of type java.nio.charset.Charset

DRAW_FACTORYback to summary
public static final Drawable.DrawableHint DRAW_FACTORY

DrawFactory which will be used to draw objects into this graphics context

EMF_FORCE_HEADER_BOUNDSback to summary
public static final Drawable.DrawableHint EMF_FORCE_HEADER_BOUNDS

A boolean value to force the usage of the bounding box, which is specified in the EMF header. Defaults to FALSE - in this case the records are scanned for window and viewport records to determine the initial bounding box by using the following condition: isValid(viewport) ? viewport : isValid(window) ? window : headerBounds

This is a workaround switch, which might be removed in future releases, when the bounding box determination for the special cases is fixed. In most cases it's recommended to leave the default value.

FONT_FALLBACKback to summary
public static final Drawable.DrawableHint FONT_FALLBACK

Key for a font fallback map of type Map<String,String> which maps the original font family (key) to the fallback font family (value). In case there is also a FONT_MAP registered, the original font is first mapped via the font_map and then the fallback font is determined

FONT_HANDLERback to summary
public static final Drawable.DrawableHint FONT_HANDLER

Use this object to resolve unknown / missing fonts when rendering slides. The font handler must be of type DrawFontManager.

In case a FONT_HANDLER is register, FONT_FALLBACK and FONT_MAP are ignored

FONT_MAPback to summary
public static final Drawable.DrawableHint FONT_MAP

Key for a font map of type Map<String,String> which maps the original font family (key) to the mapped font family (value)

GRADIENT_SHAPEback to summary
public static final Drawable.DrawableHint GRADIENT_SHAPE

PathGradientPaint needs the shape to be set. It will be achieved through setting it in the rendering hints

GRESTOREback to summary
public static final Drawable.DrawableHint GRESTORE
GROUP_TRANSFORMback to summary
public static final Drawable.DrawableHint GROUP_TRANSFORM

Key will be internally used to store affine transformation temporarily within group shapes

Annotations
@Internal
GSAVEback to summary
public static final Drawable.DrawableHint GSAVE
IMAGE_RENDERERback to summary
public static final Drawable.DrawableHint IMAGE_RENDERER

Use a custom image renderer of an instance of ImageRenderer

PRESET_GEOMETRY_CACHEback to summary
public static final Drawable.DrawableHint PRESET_GEOMETRY_CACHE

Internal key for caching the preset geometries

TEXT_AS_CHARACTERSback to summary
public static final int TEXT_AS_CHARACTERS

draw text via java.awt.Graphics2D#drawString(java.text.AttributedCharacterIterator, float, float)

TEXT_AS_SHAPESback to summary
public static final int TEXT_AS_SHAPES

draw text via java.awt.font.TextLayout#draw(java.awt.Graphics2D, float, float)

TEXT_RENDERING_MODEback to summary
public static final Drawable.DrawableHint TEXT_RENDERING_MODE

how to render text: TEXT_AS_CHARACTERS (default) means to draw via java.awt.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 java.awt.font.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.

Method Detail

applyTransformback to summary
public void applyTransform(Graphics2D graphics)

Apply 2-D transforms before drawing this shape. This includes rotation and flipping.

Parameters
graphics:Graphics2D

the graphics whose transform matrix will be modified

drawback to summary
public void draw(Graphics2D graphics)

Draw this shape into the supplied canvas

Parameters
graphics:Graphics2D

the graphics to draw into

drawContentback to summary
public void drawContent(Graphics2D graphics)

draw any content within this shape (image, text, etc.).

Parameters
graphics:Graphics2D

the graphics to draw into

org.apache.poi.sl.draw back to summary

public Class Drawable.DrawableHint

extends Key
Class Inheritance

Constructor Summary

AccessConstructor and Description
protected
DrawableHint(int id)

Method Summary

Modifier and TypeMethod and Description
public boolean
isCompatibleValue(Object
the Object to test for validity
val
)

Implements abstract java.awt.RenderingHints.Key.isCompatibleValue.

Returns true if the specified object is a valid value for this Key.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.awt.RenderingHints.Key:
equalshashCodeintKey

Constructor Detail

DrawableHintback to summary
protected DrawableHint(int id)

Method Detail

isCompatibleValueback to summary
public boolean isCompatibleValue(Object val)

Implements abstract java.awt.RenderingHints.Key.isCompatibleValue.

Doc from java.awt.RenderingHints.Key.isCompatibleValue.

Returns true if the specified object is a valid value for this Key.

Parameters
val:Object

the Object to test for validity

Returns:boolean

true if val is valid; false otherwise.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object