APIdia Launch Partner
Top Fields Constructors Methods
sun.awt.image

public final Class BufferedImageGraphicsConfig

extends GraphicsConfiguration
Class Inheritance
Imports
java.awt.Component, .Graphics2D, .GraphicsConfiguration, .GraphicsDevice, .Rectangle, .Transparency, java.awt.geom.AffineTransform, java.awt.image.BufferedImage, .ColorModel, .DirectColorModel, .Raster, .WritableRaster

Field Summary

Modifier and TypeField and Description
private final GraphicsDevice
private final ColorModel
private static final int
private final Raster
private static BufferedImageGraphicsConfig[]
private final double
private final double
private static BufferedImageGraphicsConfig[]

Constructor Summary

AccessConstructor and Description
public
BufferedImageGraphicsConfig(BufferedImage bufImg, Component comp, double scaleX, double scaleY)

Method Summary

Modifier and TypeMethod and Description
public BufferedImage
createCompatibleImage(int width, int height)

Overrides java.awt.GraphicsConfiguration.createCompatibleImage.

Returns a BufferedImage with channel layout and color model compatible with this graphics configuration.

public Rectangle
getBounds()

Implements abstract java.awt.GraphicsConfiguration.getBounds.

Returns the bounds of the GraphicsConfiguration in the device coordinates.

public ColorModel
getColorModel()

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration.

public ColorModel
getColorModel(int transparency)

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration that supports the specified transparency.

public static BufferedImageGraphicsConfig
public static BufferedImageGraphicsConfig
getConfig(BufferedImage bImg, double scaleX, double scaleY)

public AffineTransform
getDefaultTransform()

Implements abstract java.awt.GraphicsConfiguration.getDefaultTransform.

Returns the default Transform for this configuration.

public GraphicsDevice
getDevice()

Implements abstract java.awt.GraphicsConfiguration.getDevice.

Return the graphics device associated with this configuration.

public AffineTransform
getNormalizingTransform()

Implements abstract java.awt.GraphicsConfiguration.getNormalizingTransform.

Returns a Transform that can be composed with the default Transform of a Graphics2D so that 72 units in user space will equal 1 inch in device space.

Inherited from java.awt.GraphicsConfiguration:
createCompatibleImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagecreateCompatibleVolatileImagegetBufferCapabilitiesgetImageCapabilitiesisTranslucencyCapable

Field Detail

deviceback to summary
private final GraphicsDevice device
modelback to summary
private final ColorModel model
numconfigsback to summary
private static final int numconfigs
rasterback to summary
private final Raster raster
scaledConfigsback to summary
private static BufferedImageGraphicsConfig[] scaledConfigs
scaleXback to summary
private final double scaleX
scaleYback to summary
private final double scaleY
standardConfigsback to summary
private static BufferedImageGraphicsConfig[] standardConfigs

Constructor Detail

BufferedImageGraphicsConfigback to summary
public BufferedImageGraphicsConfig(BufferedImage bufImg, Component comp, double scaleX, double scaleY)

Method Detail

createCompatibleImageback to summary
public BufferedImage createCompatibleImage(int width, int height)

Overrides java.awt.GraphicsConfiguration.createCompatibleImage.

Returns a BufferedImage with channel layout and color model compatible with this graphics configuration. This method has nothing to do with memory-mapping a device. This BufferedImage has a layout and color model that is closest to this native device configuration and thus can be optimally blitted to this device.

Annotations
@Override
getBoundsback to summary
public Rectangle getBounds()

Implements abstract java.awt.GraphicsConfiguration.getBounds.

Doc from java.awt.GraphicsConfiguration.getBounds.

Returns the bounds of the GraphicsConfiguration in the device coordinates. In a multi-screen environment with a virtual device, the bounds can have negative X or Y origins.

Annotations
@Override
getColorModelback to summary
public ColorModel getColorModel()

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration.

Annotations
@Override
getColorModelback to summary
public ColorModel getColorModel(int transparency)

Implements abstract java.awt.GraphicsConfiguration.getColorModel.

Returns the color model associated with this configuration that supports the specified transparency.

Annotations
@Override
getConfigback to summary
public static BufferedImageGraphicsConfig getConfig(BufferedImage bImg)
getConfigback to summary
public static BufferedImageGraphicsConfig getConfig(BufferedImage bImg, double scaleX, double scaleY)
getDefaultTransformback to summary
public AffineTransform getDefaultTransform()

Implements abstract java.awt.GraphicsConfiguration.getDefaultTransform.

Returns the default Transform for this configuration. This Transform is typically the Identity transform for most normal screens. Device coordinates for screen and printer devices will have the origin in the upper left-hand corner of the target region of the device, with X coordinates increasing to the right and Y coordinates increasing downwards. For image buffers, this Transform will be the Identity transform.

Annotations
@Override
getDeviceback to summary
public GraphicsDevice getDevice()

Implements abstract java.awt.GraphicsConfiguration.getDevice.

Return the graphics device associated with this configuration.

Annotations
@Override
getNormalizingTransformback to summary
public AffineTransform getNormalizingTransform()

Implements abstract java.awt.GraphicsConfiguration.getNormalizingTransform.

Returns a Transform that can be composed with the default Transform of a Graphics2D so that 72 units in user space will equal 1 inch in device space. Given a Graphics2D, g, one can reset the transformation to create such a mapping by using the following pseudocode:

     GraphicsConfiguration gc = g.getGraphicsConfiguration();

     g.setTransform(gc.getDefaultTransform());
     g.transform(gc.getNormalizingTransform());
Note that sometimes this Transform will be identity (e.g. for printers or metafile output) and that this Transform is only as accurate as the information supplied by the underlying system. For image buffers, this Transform will be the Identity transform, since there is no valid distance measurement.
Annotations
@Override