Icon.drawStretchTo

Overview | Methods | This Package | All Packages

Icon.drawStretchTo

Renders the icon image to a Graphics object, stretching the image to fill the specified dimensions.

Syntax

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

Parameters

g

The Graphics object to which to draw the icon.

imageRect

A Rectangle object that specifies the icon 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

This method is used by the Graphics object for all image rendering.

If the area specified in imageRect is smaller than the area specified in targetRect, the source image is stretched to fill the specified area. If the area specified in imageRect is larger than that specified in targetRect, the image is shrunk.