APIdia Launch Partner
Top Fields Constructors Methods
sun.java2d.pipe

public Class DrawImage

extends Object
implements DrawImagePipe
Class Inheritance
All Implemented Interfaces
sun.java2d.pipe.DrawImagePipe
Known Direct Subclasses
sun.java2d.xr.XRDrawImage, sun.java2d.opengl.OGLDrawImage
Imports
java.awt.AlphaComposite, .Color, .Image, .Rectangle, .Transparency, java.awt.geom.AffineTransform, .NoninvertibleTransformException, java.awt.image.AffineTransformOp, .BufferedImage, .BufferedImageOp, .ColorModel, .DataBuffer, .ImageObserver, .IndexColorModel, .Raster, .VolatileImage, sun.awt.SunHints, sun.awt.image.ImageRepresentation, .SurfaceManager, .ToolkitImage, sun.java2d.InvalidPipeException, .SunGraphics2D, .SurfaceData, sun.java2d.loops.Blit, .BlitBg, .CompositeType, .MaskBlit, .ScaledBlit, .SurfaceType, .TransformHelper

Field Summary

Modifier and TypeField and Description
private static final double
MAX_TX_ERROR

Utilities The following methods are used by the public methods above for performing various operations

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
blitSurfaceData(SunGraphics2D sg, Region clip, SurfaceData srcData, SurfaceData dstData, int sx, int sy, int dx, int dy, int w, int h, Color bgColor)

public static boolean
closeToInteger(int i, double d)

public boolean
copyImage(SunGraphics2D sg, Image img, int x, int y, Color bgColor)

public boolean
copyImage(SunGraphics2D sg, Image img, int dx, int dy, int sx, int sy, int w, int h, Color bgColor)

public boolean
copyImage(SunGraphics2D sg, Image img, int x, int y, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.copyImage.

public boolean
copyImage(SunGraphics2D sg, Image img, int dx, int dy, int sx, int sy, int w, int h, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.copyImage.

protected BufferedImage
private ColorModel
protected static boolean
protected static boolean
isBgOperation(SurfaceData srcData, Color bgColor)

public static boolean
private BufferedImage
makeBufferedImage(Image img, Color bgColor, int type, int sx1, int sy1, int sx2, int sy2)

Return a non-accelerated BufferedImage of the requested type with the indicated subimage of the original image located at 0,0 in the new image.

protected boolean
renderImageCopy(SunGraphics2D sg, Image img, Color bgColor, int dx, int dy, int sx, int sy, int w, int h)

protected boolean
renderImageScale(SunGraphics2D sg, Image img, Color bgColor, int interpType, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2)

protected void
renderImageXform(SunGraphics2D sg, Image img, AffineTransform tx, int interpType, int sx1, int sy1, int sx2, int sy2, Color bgColor)

public boolean
scaleImage(SunGraphics2D sg, Image img, int x, int y, int width, int height, Color bgColor)

public boolean
scaleImage(SunGraphics2D sg, Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgColor)

public boolean
scaleImage(SunGraphics2D sg, Image img, int x, int y, int width, int height, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.scaleImage.

public boolean
scaleImage(SunGraphics2D sg, Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.scaleImage.

protected boolean
scaleSurfaceData(SunGraphics2D sg, Region clipRegion, SurfaceData srcData, SurfaceData dstData, SurfaceType srcType, SurfaceType dstType, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2)

protected void
transformImage(SunGraphics2D sg, Image img, int x, int y, AffineTransform extraAT, int interpType)

protected void
transformImage(SunGraphics2D sg, Image img, AffineTransform tx, int interpType, int sx1, int sy1, int sx2, int sy2, Color bgColor)

public boolean
public void
protected boolean
tryCopyOrScale(SunGraphics2D sg, Image img, int sx1, int sy1, int sx2, int sy2, Color bgColor, int interpType, double[] coords)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MAX_TX_ERRORback to summary
private static final double MAX_TX_ERROR

Utilities The following methods are used by the public methods above for performing various operations

Constructor Detail

DrawImageback to summary
public DrawImage()

Method Detail

blitSurfaceDataback to summary
private static void blitSurfaceData(SunGraphics2D sg, Region clip, SurfaceData srcData, SurfaceData dstData, int sx, int sy, int dx, int dy, int w, int h, Color bgColor)
closeToIntegerback to summary
public static boolean closeToInteger(int i, double d)
copyImageback to summary
public boolean copyImage(SunGraphics2D sg, Image img, int x, int y, Color bgColor)
copyImageback to summary
public boolean copyImage(SunGraphics2D sg, Image img, int dx, int dy, int sx, int sy, int w, int h, Color bgColor)
copyImageback to summary
public boolean copyImage(SunGraphics2D sg, Image img, int x, int y, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.copyImage.

copyImageback to summary
public boolean copyImage(SunGraphics2D sg, Image img, int dx, int dy, int sx, int sy, int w, int h, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.copyImage.

getBufferedImageback to summary
protected BufferedImage getBufferedImage(Image img)
getTransformColorModelback to summary
private ColorModel getTransformColorModel(SunGraphics2D sg, BufferedImage bImg, AffineTransform tx)
imageReadyback to summary
protected static boolean imageReady(ToolkitImage sunimg, ImageObserver observer)
isBgOperationback to summary
protected static boolean isBgOperation(SurfaceData srcData, Color bgColor)
isSimpleTranslateback to summary
public static boolean isSimpleTranslate(SunGraphics2D sg)
makeBufferedImageback to summary
private BufferedImage makeBufferedImage(Image img, Color bgColor, int type, int sx1, int sy1, int sx2, int sy2)

Return a non-accelerated BufferedImage of the requested type with the indicated subimage of the original image located at 0,0 in the new image. If a bgColor is supplied, composite the original image over that color with a SrcOver operation, otherwise make a SrcNoEa copy.

Returned BufferedImage is not accelerated for two reasons:

  • Types of the image and surface are predefined, because these types correspond to the TransformHelpers, which we know we have. And acceleration can change the type of the surface
  • Image will be used only once and acceleration caching wouldn't help
renderImageCopyback to summary
protected boolean renderImageCopy(SunGraphics2D sg, Image img, Color bgColor, int dx, int dy, int sx, int sy, int w, int h)
renderImageScaleback to summary
protected boolean renderImageScale(SunGraphics2D sg, Image img, Color bgColor, int interpType, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2)
renderImageXformback to summary
protected void renderImageXform(SunGraphics2D sg, Image img, AffineTransform tx, int interpType, int sx1, int sy1, int sx2, int sy2, Color bgColor)
scaleImageback to summary
public boolean scaleImage(SunGraphics2D sg, Image img, int x, int y, int width, int height, Color bgColor)
scaleImageback to summary
public boolean scaleImage(SunGraphics2D sg, Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgColor)
scaleImageback to summary
public boolean scaleImage(SunGraphics2D sg, Image img, int x, int y, int width, int height, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.scaleImage.

scaleImageback to summary
public boolean scaleImage(SunGraphics2D sg, Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgColor, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.scaleImage.

scaleSurfaceDataback to summary
protected boolean scaleSurfaceData(SunGraphics2D sg, Region clipRegion, SurfaceData srcData, SurfaceData dstData, SurfaceType srcType, SurfaceType dstType, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2)
transformImageback to summary
protected void transformImage(SunGraphics2D sg, Image img, int x, int y, AffineTransform extraAT, int interpType)
transformImageback to summary
protected void transformImage(SunGraphics2D sg, Image img, AffineTransform tx, int interpType, int sx1, int sy1, int sx2, int sy2, Color bgColor)
transformImageback to summary
public boolean transformImage(SunGraphics2D sg, Image img, AffineTransform atfm, ImageObserver observer)

Implements sun.java2d.pipe.DrawImagePipe.transformImage.

transformImageback to summary
public void transformImage(SunGraphics2D sg, BufferedImage img, BufferedImageOp op, int x, int y)

Implements sun.java2d.pipe.DrawImagePipe.transformImage.

tryCopyOrScaleback to summary
protected boolean tryCopyOrScale(SunGraphics2D sg, Image img, int sx1, int sy1, int sx2, int sy2, Color bgColor, int interpType, double[] coords)