diff --git a/jdk16/src/main/java/org/piccolo2d/jdk16/nodes/PPath.java b/jdk16/src/main/java/org/piccolo2d/jdk16/nodes/PPath.java index 9a9ef4a..3ed3763 100644 --- a/jdk16/src/main/java/org/piccolo2d/jdk16/nodes/PPath.java +++ b/jdk16/src/main/java/org/piccolo2d/jdk16/nodes/PPath.java @@ -636,6 +636,16 @@ } /** + * Reset the geometry for this path node to empty. + */ + public final void reset() { + Path2D oldPath = (Path2D) path.clone(); + path.reset(); + updateBoundsFromShape(); + firePropertyChange(-1, "path", oldPath, getPath()); + } + + /** * Close the current subpath by drawing a straight line back to the coordinates * of the last moveTo. If the path is already closed then this method * has no effect.