|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.sl.draw.BitmapImageRenderer
public class BitmapImageRenderer
For now this class renders only images supported by the javax.imageio.ImageIO framework.
Field Summary | |
---|---|
protected java.awt.image.BufferedImage |
img
|
Constructor Summary | |
---|---|
BitmapImageRenderer()
|
Method Summary | |
---|---|
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.Dimension |
getDimension()
|
java.awt.image.BufferedImage |
getImage()
|
java.awt.image.BufferedImage |
getImage(java.awt.Dimension dim)
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.image.BufferedImage img
Constructor Detail |
---|
public BitmapImageRenderer()
Method Detail |
---|
public 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 type
java.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 type
java.io.IOException
public java.awt.image.BufferedImage getImage()
getImage
in interface ImageRenderer
public java.awt.image.BufferedImage getImage(java.awt.Dimension dim)
getImage
in interface ImageRenderer
dim
- the dimension in pixels of the returned image
public java.awt.Dimension 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 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |