Rectangle clip = Rectangle.SINGLETON;
List children = this.getChildren();
for (int i = 0; i < children.size(); i++) {
child = (IFigure) children.get(i);
if (child.isVisible() && child.intersects(graphics.getClip(clip))) {
// graphics.clipRect(child.getBounds());
child.paint(graphics);
graphics.restoreState();
}
}