Package org.apache.poi.xslf.draw
Class SVGImageRenderer
java.lang.Object
org.apache.poi.xslf.draw.SVGImageRenderer
- All Implemented Interfaces:
ImageRenderer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if this image renderer implementation supports the given contentTypebooleandrawImage(Graphics2D graphics, Rectangle2D anchor) Render picture data into the supplied graphicsbooleandrawImage(Graphics2D graphics, Rectangle2D anchor, Insets clip) Render picture data into the supplied graphicsgetImage()getImage(Dimension2D dim) org.apache.batik.gvt.GraphicsNodevoidLoad and buffer the imagevoidloadImage(InputStream data, String contentType) Load and buffer the imagevoidsetAlpha(double alpha) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.sl.draw.ImageRenderer
getCachedContentType, getCachedImage, getDimension, getGenericRecord, setCacheInput, setDefaultCharset
-
Constructor Details
-
SVGImageRenderer
public SVGImageRenderer()
-
-
Method Details
-
loadImage
Description copied from interface:ImageRendererLoad and buffer the image- Specified by:
loadImagein interfaceImageRenderer- Parameters:
data- the raw image streamcontentType- the content type- Throws:
IOException
-
loadImage
Description copied from interface:ImageRendererLoad and buffer the image- Specified by:
loadImagein interfaceImageRenderer- Parameters:
data- the raw image bytescontentType- the content type- Throws:
IOException
-
getBounds
- Specified by:
getBoundsin interfaceImageRenderer- Returns:
- the bounds of the buffered image in pixel
-
setAlpha
public void setAlpha(double alpha) - Specified by:
setAlphain interfaceImageRenderer- Parameters:
alpha- the alpha [0..1] to be added to the image (possibly already containing an alpha channel)
-
getImage
- Specified by:
getImagein interfaceImageRenderer- Returns:
- the image as buffered image or null if image could not be loaded
-
getImage
- Specified by:
getImagein interfaceImageRenderer- Parameters:
dim- the dimension in pixels of the returned image- Returns:
- the image as buffered image or null if image could not be loaded
-
drawImage
Description copied from interface:ImageRendererRender picture data into the supplied graphics- Specified by:
drawImagein interfaceImageRenderer- Returns:
- true if the picture data was successfully rendered
-
drawImage
Description copied from interface:ImageRendererRender picture data into the supplied graphics- Specified by:
drawImagein interfaceImageRenderer- Returns:
- true if the picture data was successfully rendered
-
canRender
Description copied from interface:ImageRendererDetermines if this image renderer implementation supports the given contentType- Specified by:
canRenderin interfaceImageRenderer- Parameters:
contentType- the image content type- Returns:
- if the content type is supported
-
getNativeBounds
- Specified by:
getNativeBoundsin interfaceImageRenderer- Returns:
- the format-specific / not-normalized bounds of the image
-
getSVGRoot
public org.apache.batik.gvt.GraphicsNode getSVGRoot()
-