- java.lang.Object
-
- java.awt.GraphicsConfiguration
-
- org.jfree.svg.SVGGraphicsConfiguration
-
public class SVGGraphicsConfiguration extends java.awt.GraphicsConfiguration
A graphics configuration for theSVGGraphics2D
class.
-
-
Constructor Summary
Constructors Constructor Description SVGGraphicsConfiguration(int width, int height)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
createCompatibleImage(int width, int height)
Creates a compatible image.java.awt.image.VolatileImage
createCompatibleVolatileImage(int width, int height, java.awt.ImageCapabilities caps, int transparency)
Returns a volatile image.java.awt.Rectangle
getBounds()
Returns the bounds for this configuration.java.awt.image.ColorModel
getColorModel()
Returns the color model for this configuration.java.awt.image.ColorModel
getColorModel(int transparency)
Returns the color model for the specified transparency type, ornull
.java.awt.geom.AffineTransform
getDefaultTransform()
Returns the default transform.java.awt.GraphicsDevice
getDevice()
Returns the graphics device that this configuration is associated with.java.awt.geom.AffineTransform
getNormalizingTransform()
Returns the normalizing transform.
-
-
-
Constructor Detail
-
SVGGraphicsConfiguration
public SVGGraphicsConfiguration(int width, int height)
Creates a new instance.- Parameters:
width
- the width of the bounds.height
- the height of the bounds.
-
-
Method Detail
-
getDevice
public java.awt.GraphicsDevice getDevice()
Returns the graphics device that this configuration is associated with.- Specified by:
getDevice
in classjava.awt.GraphicsConfiguration
- Returns:
- The graphics device (never
null
).
-
getColorModel
public java.awt.image.ColorModel getColorModel()
Returns the color model for this configuration.- Specified by:
getColorModel
in classjava.awt.GraphicsConfiguration
- Returns:
- The color model.
-
getColorModel
public java.awt.image.ColorModel getColorModel(int transparency)
Returns the color model for the specified transparency type, ornull
.- Specified by:
getColorModel
in classjava.awt.GraphicsConfiguration
- Parameters:
transparency
- the transparency type.- Returns:
- A color model (possibly
null
).
-
getDefaultTransform
public java.awt.geom.AffineTransform getDefaultTransform()
Returns the default transform.- Specified by:
getDefaultTransform
in classjava.awt.GraphicsConfiguration
- Returns:
- The default transform.
-
getNormalizingTransform
public java.awt.geom.AffineTransform getNormalizingTransform()
Returns the normalizing transform.- Specified by:
getNormalizingTransform
in classjava.awt.GraphicsConfiguration
- Returns:
- The normalizing transform.
-
getBounds
public java.awt.Rectangle getBounds()
Returns the bounds for this configuration.- Specified by:
getBounds
in classjava.awt.GraphicsConfiguration
- Returns:
- The bounds.
-
createCompatibleImage
public java.awt.image.BufferedImage createCompatibleImage(int width, int height)
Creates a compatible image. This override is only here to provide support for Java 6 because from Java 7 onwards the super class has a non-abstract implementation for this method.- Overrides:
createCompatibleImage
in classjava.awt.GraphicsConfiguration
- Parameters:
width
- the width.height
- the height.- Returns:
- A compatible image.
-
createCompatibleVolatileImage
public java.awt.image.VolatileImage createCompatibleVolatileImage(int width, int height, java.awt.ImageCapabilities caps, int transparency) throws java.awt.AWTException
Returns a volatile image. This method is a workaround for a ClassCastException that occurs on MacOSX when exporting a Swing UI that uses the Nimbus Look and Feel to SVG.- Overrides:
createCompatibleVolatileImage
in classjava.awt.GraphicsConfiguration
- Parameters:
width
- the image width.height
- the image height.caps
- the image capabilities.transparency
- the transparency.- Returns:
- The volatile image.
- Throws:
java.awt.AWTException
- if there is a problem creating the image.
-
-