public class

NullSurfaceData

extends SurfaceData
java.lang.Object
   ↳ sun.java2d.SurfaceData
     ↳ sun.java2d.NullSurfaceData

Class Overview

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

Summary

[Expand]
Inherited Constants
From interface java.awt.Transparency
Fields
public static final SurfaceData theInstance
[Expand]
Inherited Fields
From class sun.java2d.SurfaceData
Public Methods
boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)
Performs a copyarea within this surface.
Rectangle getBounds()
Returns the bounds of the destination surface.
Object getDestination()
Returns destination Image associated with this SurfaceData (null)
GraphicsConfiguration getDeviceConfiguration()
Return the GraphicsConfiguration object that describes this destination surface.
Raster getRaster(int x, int y, int w, int h)
Return a readable Raster which contains the pixels for the specified rectangular region of the destination surface.
SurfaceData getReplacement()
Return a new SurfaceData object that represents the current state of the destination that this SurfaceData object describes.
void invalidate()
Sets this SurfaceData object to the invalid state.
int pixelFor(int rgb)
Returns the pixel data for the specified Argb value packed into an integer for easy storage and conveyance.
int rgbFor(int pixel)
Returns the Argb representation for the specified integer value which is packed in the format of the associated ColorModel.
boolean 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.
void validatePipe(SunGraphics2D sg2d)
Protected Methods
void checkCustomComposite()
Performs Security Permissions checks to see if a Custom Composite object should be allowed access to the pixels of this surface.
[Expand]
Inherited Methods
From class sun.java2d.SurfaceData
From class java.lang.Object
From interface java.awt.Transparency
From interface sun.java2d.DisposerTarget
From interface sun.java2d.StateTrackable

Fields

public static final SurfaceData theInstance

Public Methods

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

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

public Rectangle getBounds ()

Returns the bounds of the destination surface.

public Object getDestination ()

Returns destination Image associated with this SurfaceData (null)

public GraphicsConfiguration getDeviceConfiguration ()

Return the GraphicsConfiguration object that describes this destination surface.

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

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

public 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.

public void 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.

public int pixelFor (int rgb)

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

public int rgbFor (int pixel)

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

public boolean 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

public void validatePipe (SunGraphics2D sg2d)

Protected Methods

protected void checkCustomComposite ()

Performs Security Permissions checks to see if a Custom Composite object should be allowed access to the pixels of this surface.