public class GraphicsConfigurationWithTransparency extends AbstractGraphicsConfiguration
GraphicsConfiguration
that supports transparencies (alpha
channels).Constructor | Description |
---|---|
GraphicsConfigurationWithTransparency() |
Modifier and Type | Method | Description |
---|---|---|
java.awt.image.BufferedImage |
createCompatibleImage(int width,
int height) |
Construct a buffered image with an alpha channel.
|
java.awt.image.BufferedImage |
createCompatibleImage(int width,
int height,
int transparency) |
Construct a buffered image with an alpha channel, unless transparency is OPAQUE (no alpha
at all).
|
java.awt.Rectangle |
getBounds() |
TODO: This should return the page bounds in Pts, I couldn't figure out how to get this for
the current page (this still works for now, but it should be fixed...).
|
java.awt.image.ColorModel |
getColorModel() |
Return a good default color model for this 'device'.
|
java.awt.image.ColorModel |
getColorModel(int transparency) |
Return a good color model given
transparency |
java.awt.geom.AffineTransform |
getDefaultTransform() |
The default transform (1:1).
|
java.awt.GraphicsDevice |
getDevice() |
Return our dummy instance of GraphicsDevice
|
java.awt.geom.AffineTransform |
getNormalizingTransform() |
The normalizing transform (1:1) (since we currently
render images at 72dpi, which we might want to change
in the future).
|
createCompatibleVolatileImage, createCompatibleVolatileImage
public GraphicsConfigurationWithTransparency()
public java.awt.image.BufferedImage createCompatibleImage(int width, int height, int transparency)
createCompatibleImage
in class java.awt.GraphicsConfiguration
width
- the width of the imageheight
- the height of the imagetransparency
- the alpha value of the imagepublic java.awt.image.BufferedImage createCompatibleImage(int width, int height)
createCompatibleImage
in class java.awt.GraphicsConfiguration
width
- the width of the imageheight
- the height of the imagepublic java.awt.Rectangle getBounds()
getBounds
in class java.awt.GraphicsConfiguration
public java.awt.image.ColorModel getColorModel()
getColorModel
in class java.awt.GraphicsConfiguration
public java.awt.image.ColorModel getColorModel(int transparency)
transparency
getColorModel
in class java.awt.GraphicsConfiguration
transparency
- the alpha value for the colour modelpublic java.awt.geom.AffineTransform getDefaultTransform()
getDefaultTransform
in class java.awt.GraphicsConfiguration
public java.awt.geom.AffineTransform getNormalizingTransform()
getNormalizingTransform
in class java.awt.GraphicsConfiguration
public java.awt.GraphicsDevice getDevice()
getDevice
in class java.awt.GraphicsConfiguration
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.