Sets the clip on a graphics object by merging a supplied clip with the existing one. The new
clip will be an intersection of the old clip and the supplied clip. The old clip shape will
be returned. This is useful for resetting the old clip after an operation is performed.
g - the graphics object to update
clip - a new clipping region to add to the graphics clip.
the current clipping region of the supplied graphics object. This may return
null if the current clip is null.