Graphics.create

Graphics.create

Class Overview | Class Members | This Package | All Packages

Syntax 1
public abstract Graphics create()
Returns
a new graphics context that is a copy of this graphics context.
Description
Creates a new Graphics object that is a copy of this Graphics object.



Syntax 2
public Graphics create( int x, int y, int width, int height )
Parameters
x
the x coordinate.
y
the y coordinate.
width
the width of the clipping rectangle.
height
the height of the clipping rectangle.
Returns
a new graphics context.
Description
Creates a new Graphics object based on this Graphics object, but with a new translation and clip area. The new Graphics object has its origin translated to the specified point (xy). Its clip area is determined by the intersection of the original clip area with the specified rectangle. The arguments are all interpreted in the coordinate system of the original Graphics object. The new graphics context is identical to the original, except in two respects:

See Also
translate, clipRect