public class BitmapImageRenderer extends Object implements ImageRenderer
| Modifier and Type | Field and Description |
|---|---|
protected BufferedImage |
img |
| Constructor and Description |
|---|
BitmapImageRenderer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
drawImage(Graphics2D graphics,
Rectangle2D anchor)
Render picture data into the supplied graphics
|
boolean |
drawImage(Graphics2D graphics,
Rectangle2D anchor,
Insets clip)
Render picture data into the supplied graphics
|
Dimension |
getDimension() |
BufferedImage |
getImage() |
BufferedImage |
getImage(Dimension dim) |
void |
loadImage(byte[] data,
String contentType)
Load and buffer the image
|
void |
loadImage(InputStream data,
String contentType)
Load and buffer the image
|
void |
setAlpha(double alpha) |
protected BufferedImage img
public void loadImage(InputStream data, String contentType) throws IOException
ImageRendererloadImage in interface ImageRendererdata - the raw image streamcontentType - the content typeIOExceptionpublic void loadImage(byte[] data,
String contentType)
throws IOException
ImageRendererloadImage in interface ImageRendererdata - the raw image bytescontentType - the content typeIOExceptionpublic BufferedImage getImage()
getImage in interface ImageRendererpublic BufferedImage getImage(Dimension dim)
getImage in interface ImageRendererdim - the dimension in pixels of the returned imagepublic Dimension getDimension()
getDimension in interface ImageRendererpublic void setAlpha(double alpha)
setAlpha in interface ImageRendereralpha - the alpha [0..1] to be added to the image (possibly already containing an alpha channel)public boolean drawImage(Graphics2D graphics, Rectangle2D anchor)
ImageRendererdrawImage in interface ImageRendererpublic boolean drawImage(Graphics2D graphics, Rectangle2D anchor, Insets clip)
ImageRendererdrawImage in interface ImageRendererCopyright 2019 The Apache Software Foundation or its licensors, as applicable.