Package org.apache.fop.svg
Class PDFGraphicsConfiguration
java.lang.Object
java.awt.GraphicsConfiguration
org.apache.fop.svg.GraphicsConfiguration
org.apache.fop.svg.PDFGraphicsConfiguration
Our implementation of the class that returns information about
roughly what we can handle and want to see (alpha for example).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final BufferedImage
private static final BufferedImage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCompatibleImage
(int width, int height) Construct a buffered image with an alpha channel.createCompatibleImage
(int width, int height, int transparency) Construct a buffered image with an alpha channel, unless transparencty is OPAQUE (no alpha at all).TODO: This should return the page bounds in Pts, I couldn't figure out how to get this for the current page from the PDFDocument (this still works for now, but it should be fixed...).Return a good default color model for this 'device'.getColorModel
(int transparency) Return a good color model giventransparency
The default transform (1:1).Return our dummy instance of GraphicsDeviceThe normalizing transform (1:1) (since we currently render images at 72dpi, which we might want to change in the future).Methods inherited from class org.apache.fop.svg.GraphicsConfiguration
createCompatibleVolatileImage, createCompatibleVolatileImage
Methods inherited from class java.awt.GraphicsConfiguration
createCompatibleVolatileImage, createCompatibleVolatileImage, getBufferCapabilities, getImageCapabilities, isTranslucencyCapable
-
Field Details
-
BI_WITH_ALPHA
-
BI_WITHOUT_ALPHA
-
-
Constructor Details
-
PDFGraphicsConfiguration
PDFGraphicsConfiguration()
-
-
Method Details
-
createCompatibleImage
Construct a buffered image with an alpha channel, unless transparencty is OPAQUE (no alpha at all).- Overrides:
createCompatibleImage
in classGraphicsConfiguration
- Parameters:
width
- the width of the imageheight
- the height of the imagetransparency
- the alpha value of the image- Returns:
- the new buffered image
-
createCompatibleImage
Construct a buffered image with an alpha channel.- Overrides:
createCompatibleImage
in classGraphicsConfiguration
- Parameters:
width
- the width of the imageheight
- the height of the image- Returns:
- the new buffered image
-
getBounds
TODO: This should return the page bounds in Pts, I couldn't figure out how to get this for the current page from the PDFDocument (this still works for now, but it should be fixed...).- Specified by:
getBounds
in classGraphicsConfiguration
- Returns:
- the bounds of the PDF document page
-
getColorModel
Return a good default color model for this 'device'.- Specified by:
getColorModel
in classGraphicsConfiguration
- Returns:
- the colour model for the configuration
-
getColorModel
Return a good color model giventransparency
- Specified by:
getColorModel
in classGraphicsConfiguration
- Parameters:
transparency
- the alpha value for the colour model- Returns:
- the colour model for the configuration
-
getDefaultTransform
The default transform (1:1).- Specified by:
getDefaultTransform
in classGraphicsConfiguration
- Returns:
- the default transform for the configuration
-
getNormalizingTransform
The normalizing transform (1:1) (since we currently render images at 72dpi, which we might want to change in the future).- Specified by:
getNormalizingTransform
in classGraphicsConfiguration
- Returns:
- the normalizing transform for the configuration
-
getDevice
Return our dummy instance of GraphicsDevice- Specified by:
getDevice
in classGraphicsConfiguration
- Returns:
- the PDF graphics device
-