/** {@inheritDoc} */
public void clipRect(Rectangle rect) throws IFException {
try {
PSGenerator generator = getGenerator();
endTextObject();
generator.defineRect(rect.x / 1000.0, rect.y / 1000.0,
rect.width / 1000.0, rect.height / 1000.0);
generator.writeln(generator.mapCommand("clip") + " " + generator.mapCommand("newpath"));
} catch (IOException ioe) {
throw new IFException("I/O error in clipRect()", ioe);
}