Cursor.drawTo

Overview | Methods | Fields | This Package | All Packages

Cursor.drawTo

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

Syntax

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

Parameters

g

The Graphics object to which to draw the cursor.

imageRect

A Rectangle object that specifies the source rectangle in the cursor.

targetRect

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

rop

A numerical ROP code that specifies how to draw the cursor.

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.