Bitmap.getGraphics

Overview | Methods | This Package | All Packages

Bitmap.getGraphics

Retrieves a Graphics object that you can use to paint to this image.

Syntax

public final Graphics getGraphics()

Return Value

Returns a Graphics object for the Bitmap object. If a Graphics object does not already exist for this object, one is created. If you have created a Graphics object through a previous call to getGraphics, the existing Graphics object is returned.

Remarks

When you create a Graphics object instance using the Bitmap object's getGraphics method, the Graphics object's drawing methods draw to the surface of the Bitmap object itself.