Java Utililty Methods Graphics Clip

List of utility methods to do Graphics Clip

Description

The list of methods to do Graphics Clip are organized into topic(s).

Method

ShapemergeClip(Graphics g, Shape clip)
Sets the clip on a graphics object by merging a supplied clip with the existing one.
Shape oldClip = g.getClip();
if (oldClip == null) {
    g.setClip(clip);
    return null;
Area area = new Area(oldClip);
area.intersect(new Area(clip));
g.setClip(area);
...
voidresetClip(Graphics g)
reset Clip
g.setClip((Shape) clipBoundsStack.pop());
voidrestoreClip(final Graphics g, final Shape clip)
restore Clip
restoreClip(g, clip, true);
ShapesubtractClip(final Graphics g, final Shape clip)
subtract Clip
return subtractClip(g, clip, true);