Image.drawStretchTo

Overview | Methods | This Package | All Packages

Image.drawStretchTo

Renders the image (or part of it) to a Graphics object, stretching the image to fit the specified dimensions.

Syntax

protected abstract void drawStretchTo( Graphics g, Rectangle imageRect, Rectangle targetRect, int rop )

Parameters

g

The Graphics object to which to draw the image.

imageRect

A Rectangle object that specifies the bitmap region to draw.

targetRect

A Rectangle object that specifies the area to which to draw the image.

rop

A numerical raster operation (ROP) code that describes how to draw the source image to the target.

Remarks

The command to draw an image originates with the Graphics object. The Graphics object has no built-in image drawing capability so it generally passes the command to the image's drawTo or drawStretchTo methods.

Users should take advantage the wide variety of image-drawing methods supported by the Graphics object rather than attempting to directly call the image-drawing methods implemented in the classes that extend this one.