Overview | Methods | This Package | All Packages
Renders the bitmap image (or part of it) to a Graphics object, cropping the image to fit the specified dimensions.
Syntax
protected 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.
Remarks
The drawStretchTo and drawTo methods are used by the Graphics object for all image rendering. For more information on how the Graphics object uses these methods, see the Graphics object's drawImage method.
See Also drawStretchTo