Package org.apache.fop.render.bitmap
Class BitmapRenderingSettings
java.lang.Object
org.apache.fop.render.java2d.Java2DRenderingSettings
org.apache.fop.render.bitmap.BitmapRenderingSettings
This class holds settings used when rendering to bitmaps.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the BufferedImage type.Returns the compression method being used by the image writer.org.apache.xmlgraphics.image.writer.ImageWriterParams
Returns the image writer parameters used for encoding the bitmap images.boolean
Indicates whether anti-aliasing is enabled.boolean
Indicates whether quality rendering is enabled.void
setAntiAliasing
(boolean value) Enables or disables anti-aliasing.void
setBufferedImageType
(int bufferedImageType) Sets the type of the BufferedImage to use when preparing a new instance.void
setCompressionMethod
(String compressionMethod) Sets the compression method for the image writer.void
setQualityRendering
(boolean quality) Controls whether to optimize rendering for speed or for quality.void
setResolution
(int dpi) Sets the resolution of the output image.Methods inherited from class org.apache.fop.render.java2d.Java2DRenderingSettings
getPageBackgroundColor, hasTransparentPageBackground, setPageBackgroundColor
-
Constructor Details
-
BitmapRenderingSettings
public BitmapRenderingSettings()Default constructor. Initializes the settings to their default values.
-
-
Method Details
-
getWriterParams
public org.apache.xmlgraphics.image.writer.ImageWriterParams getWriterParams()Returns the image writer parameters used for encoding the bitmap images.- Returns:
- the image writer parameters
-
getBufferedImageType
public int getBufferedImageType()Returns the BufferedImage type.- Returns:
- one of BufferedImage.TYPE_*
-
setBufferedImageType
public void setBufferedImageType(int bufferedImageType) Sets the type of the BufferedImage to use when preparing a new instance.- Parameters:
bufferedImageType
- a BufferImage.TYPE_* value
-
setAntiAliasing
public void setAntiAliasing(boolean value) Enables or disables anti-aliasing.- Parameters:
value
- true to enable anti-aliasing
-
isAntiAliasingEnabled
public boolean isAntiAliasingEnabled()Indicates whether anti-aliasing is enabled.- Returns:
- true if anti-aliasing is enabled
-
setQualityRendering
public void setQualityRendering(boolean quality) Controls whether to optimize rendering for speed or for quality.- Parameters:
quality
- true to optimize for quality, false to optimize for speed
-
isQualityRenderingEnabled
public boolean isQualityRenderingEnabled()Indicates whether quality rendering is enabled.- Returns:
- true indicates optimization for quality, false indicates optimization for speed
-
setCompressionMethod
Sets the compression method for the image writer.- Parameters:
compressionMethod
- the compression method name
-
getCompressionMethod
Returns the compression method being used by the image writer.- Returns:
- the compression method in use
-
setResolution
public void setResolution(int dpi) Sets the resolution of the output image.- Parameters:
dpi
- the dots-per-inch of the image
-