Image.drawTo

Overview | Methods | This Package | All Packages

Image.drawTo

Renders the bitmap image to a Graphics object, cropping the image to fill the specified dimensions.

Syntax

protected abstract void drawTo( 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 source rectangle in the image.

targetRect

A Rectangle object that specifies the rectangle to which to draw the image. If this area is smaller than imageRect, the source rectangle is cropped to fit in the target rectangle.

rop

A numerical raster operation (ROP) code that specifies how to draw the image.