public class HwmfImageRenderer extends java.lang.Object implements ImageRenderer, EmbeddedExtractor
DrawPictureShape
via reflectionEmbeddedExtractor.EmbeddedPart
Constructor and Description |
---|
HwmfImageRenderer() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRender(java.lang.String contentType)
Determines if this image renderer implementation supports the given contentType
|
boolean |
drawImage(java.awt.Graphics2D graphics,
java.awt.geom.Rectangle2D anchor)
Render picture data into the supplied graphics
|
boolean |
drawImage(java.awt.Graphics2D graphics,
java.awt.geom.Rectangle2D anchor,
java.awt.Insets clip)
Render picture data into the supplied graphics
|
java.awt.geom.Rectangle2D |
getBounds() |
java.awt.geom.Dimension2D |
getDimension() |
java.lang.Iterable<EmbeddedExtractor.EmbeddedPart> |
getEmbeddings() |
static java.lang.Iterable<EmbeddedExtractor.EmbeddedPart> |
getEmbeddings(java.lang.Iterable<HwmfEmbedded> embs) |
GenericRecord |
getGenericRecord() |
java.awt.image.BufferedImage |
getImage() |
java.awt.image.BufferedImage |
getImage(java.awt.geom.Dimension2D dim) |
java.awt.geom.Rectangle2D |
getNativeBounds() |
static java.awt.geom.Rectangle2D |
getOuterBounds(java.awt.geom.Rectangle2D anchor,
java.awt.Insets clip) |
void |
loadImage(byte[] data,
java.lang.String contentType)
Load and buffer the image
|
void |
loadImage(java.io.InputStream data,
java.lang.String contentType)
Load and buffer the image
|
void |
setAlpha(double alpha) |
void |
setDefaultCharset(java.nio.charset.Charset defaultCharset)
Sets the default charset to render text elements.
|
public boolean canRender(java.lang.String contentType)
ImageRenderer
canRender
in interface ImageRenderer
contentType
- the image content typepublic void loadImage(java.io.InputStream data, java.lang.String contentType) throws java.io.IOException
ImageRenderer
loadImage
in interface ImageRenderer
data
- the raw image streamcontentType
- the content typejava.io.IOException
public void loadImage(byte[] data, java.lang.String contentType) throws java.io.IOException
ImageRenderer
loadImage
in interface ImageRenderer
data
- the raw image bytescontentType
- the content typejava.io.IOException
public java.awt.geom.Dimension2D getDimension()
getDimension
in interface ImageRenderer
public void setAlpha(double alpha)
setAlpha
in interface ImageRenderer
alpha
- the alpha [0..1] to be added to the image (possibly already containing an alpha channel)public java.awt.image.BufferedImage getImage()
getImage
in interface ImageRenderer
public java.awt.image.BufferedImage getImage(java.awt.geom.Dimension2D dim)
getImage
in interface ImageRenderer
dim
- the dimension in pixels of the returned imagepublic boolean drawImage(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D anchor)
ImageRenderer
drawImage
in interface ImageRenderer
public boolean drawImage(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D anchor, java.awt.Insets clip)
ImageRenderer
drawImage
in interface ImageRenderer
@Internal public static java.awt.geom.Rectangle2D getOuterBounds(java.awt.geom.Rectangle2D anchor, java.awt.Insets clip)
public GenericRecord getGenericRecord()
getGenericRecord
in interface ImageRenderer
public java.lang.Iterable<EmbeddedExtractor.EmbeddedPart> getEmbeddings()
getEmbeddings
in interface EmbeddedExtractor
@Internal public static java.lang.Iterable<EmbeddedExtractor.EmbeddedPart> getEmbeddings(java.lang.Iterable<HwmfEmbedded> embs)
public java.awt.geom.Rectangle2D getNativeBounds()
getNativeBounds
in interface ImageRenderer
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface ImageRenderer
public void setDefaultCharset(java.nio.charset.Charset defaultCharset)
ImageRenderer
setDefaultCharset
in interface ImageRenderer
defaultCharset
- the default charsetCopyright 2021 The Apache Software Foundation or its licensors, as applicable.