APIdia Launch Partner
Top Description Fields Constructors Methods
sun.java2d

public Class NullSurfaceData

extends SurfaceData
Class Inheritance
Imports
java.awt.Rectangle, .GraphicsConfiguration, java.awt.image.Raster, .ColorModel, sun.java2d.StateTrackable.State, sun.java2d.loops.SurfaceType, sun.java2d.pipe.NullPipe

This class provides an empty implementation of the SurfaceData abstract superclass. All operations on it translate into NOP or harmless operations.

Field Summary

Modifier and TypeField and Description
private static final NullPipe
public static final SurfaceData
Inherited from sun.java2d.SurfaceData:
AAClipColorShapeAAClipColorViaShapeAAClipCompShapeAAClipCompViaShapeAAClipPaintShapeAAClipPaintViaShapeAAColorShapeAAColorViaPgramAAColorViaShapeAACompShapeAACompViaShapeAAPaintShapeAAPaintViaShapeaaTextRendererclipColorPipeclipColorTextclipCompPipeclipCompTextclipPaintPipeclipPaintTextcolorPipecolorPrimitivescolorTextcolorViaPgramcolorViaShapecompPipecompShapecompTextcompViaShapehaveLCDLoophavePgramSolidLoophavePgramXORLoopimagepipelcdTextRendererLOOP_FOUNDLOOP_NOTFOUNDLOOP_UNKNOWNoutlineTextRendererpaintPipepaintShapepaintTextpaintViaShapesolidTextRenderer

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)

Overrides sun.java2d.SurfaceData.copyArea.

Performs a copyarea within this surface.

public Rectangle
getBounds()

Implements abstract sun.java2d.SurfaceData.getBounds.

Returns the bounds of the destination surface.

public Object
getDestination()

Implements abstract sun.java2d.SurfaceData.getDestination.

Returns destination Image associated with this SurfaceData (null)

public GraphicsConfiguration
getDeviceConfiguration()

Implements abstract sun.java2d.SurfaceData.getDeviceConfiguration.

Return the GraphicsConfiguration object that describes this destination surface.

public Raster
getRaster(int x, int y, int w, int h)

Implements abstract sun.java2d.SurfaceData.getRaster.

Return a readable Raster which contains the pixels for the specified rectangular region of the destination surface.

public SurfaceData
getReplacement()

Implements abstract sun.java2d.SurfaceData.getReplacement.

Return a new SurfaceData object that represents the current state of the destination that this SurfaceData object describes.

public void
invalidate()

Overrides sun.java2d.SurfaceData.invalidate.

Sets this SurfaceData object to the invalid state.

public int
pixelFor(int rgb)

Overrides sun.java2d.SurfaceData.pixelFor.

Returns the pixel data for the specified Argb value packed into an integer for easy storage and conveyance.

public int
rgbFor(int pixel)

Overrides sun.java2d.SurfaceData.rgbFor.

Returns the Argb representation for the specified integer value which is packed in the format of the associated ColorModel.

public boolean
useTightBBoxes()

Overrides sun.java2d.SurfaceData.useTightBBoxes.

Does the pixel accessibility of the destination surface suggest that rendering algorithms might want to take extra time to calculate a more accurate bounding box for the operation being performed?

public void
Inherited from sun.java2d.SurfaceData:
canRenderLCDTextcanRenderParallelogramsconvertToflushgetColorModelgetDefaultScaleXgetDefaultScaleYgetDisposerReferentgetMaskFillgetNativeOpsgetPrimarySurfaceDatagetRenderLoopsgetSourceSurfaceDatagetStategetStateTrackergetSurfaceTypegetTransparencyisNullisOpaqueGrayisSurfaceLostisValidmakeProxyFormakeRenderLoopsmarkDirtypixelForrestoreContentssetBlitProxyCachesetSurfaceLost

Field Detail

nullpipeback to summary
private static final NullPipe nullpipe
theInstanceback to summary
public static final SurfaceData theInstance

Constructor Detail

NullSurfaceDataback to summary
private NullSurfaceData()

Method Detail

copyAreaback to summary
public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)

Overrides sun.java2d.SurfaceData.copyArea.

Performs a copyarea within this surface. Returns false if there is no algorithm to perform the copyarea given the current settings of the SunGraphics2D.

getBoundsback to summary
public Rectangle getBounds()

Implements abstract sun.java2d.SurfaceData.getBounds.

Returns the bounds of the destination surface.

getDestinationback to summary
public Object getDestination()

Implements abstract sun.java2d.SurfaceData.getDestination.

Returns destination Image associated with this SurfaceData (null)

getDeviceConfigurationback to summary
public GraphicsConfiguration getDeviceConfiguration()

Implements abstract sun.java2d.SurfaceData.getDeviceConfiguration.

Doc from sun.java2d.SurfaceData.getDeviceConfiguration.

Return the GraphicsConfiguration object that describes this destination surface.

getRasterback to summary
public Raster getRaster(int x, int y, int w, int h)

Implements abstract sun.java2d.SurfaceData.getRaster.

Return a readable Raster which contains the pixels for the specified rectangular region of the destination surface. The coordinate origin of the returned Raster is the same as the device space origin of the destination surface. In some cases the returned Raster might also be writeable. In most cases, the returned Raster might contain more pixels than requested.

See Also
useTightBBoxes
getReplacementback to summary
public SurfaceData getReplacement()

Implements abstract sun.java2d.SurfaceData.getReplacement.

Return a new SurfaceData object that represents the current state of the destination that this SurfaceData object describes. This method is typically called when the SurfaceData is invalidated.

invalidateback to summary
public void invalidate()

Overrides sun.java2d.SurfaceData.invalidate.

Sets this SurfaceData object to the invalid state. All Graphics objects must get a new SurfaceData object via the refresh method and revalidate their pipelines before continuing.

pixelForback to summary
public int pixelFor(int rgb)

Overrides sun.java2d.SurfaceData.pixelFor.

Returns the pixel data for the specified Argb value packed into an integer for easy storage and conveyance.

rgbForback to summary
public int rgbFor(int pixel)

Overrides sun.java2d.SurfaceData.rgbFor.

Returns the Argb representation for the specified integer value which is packed in the format of the associated ColorModel.

useTightBBoxesback to summary
public boolean useTightBBoxes()

Overrides sun.java2d.SurfaceData.useTightBBoxes.

Does the pixel accessibility of the destination surface suggest that rendering algorithms might want to take extra time to calculate a more accurate bounding box for the operation being performed? The typical case when this will be true is when a copy of the pixels has to be made when doing a getRaster. The fewer pixels copied, the faster the operation will go.

See Also
getRaster
validatePipeback to summary
public void validatePipe(SunGraphics2D sg2d)

Overrides sun.java2d.SurfaceData.validatePipe.