diff --git a/core/src/main/java/edu/umd/cs/piccolo/PCamera.java b/core/src/main/java/edu/umd/cs/piccolo/PCamera.java index f98ccf4..464e4d8 100644 --- a/core/src/main/java/edu/umd/cs/piccolo/PCamera.java +++ b/core/src/main/java/edu/umd/cs/piccolo/PCamera.java @@ -151,7 +151,7 @@ * transformed from view to local in this case. Unlike most repaint methods * in piccolo this one must not modify the viewBounds parameter. */ - public void repaintFromLayer(PBounds viewBounds, PNode repaintedLayer) { + public void repaintFromLayer(PBounds viewBounds, PLayer repaintedLayer) { TEMP_REPAINT_RECT.setRect(viewBounds); viewToLocal(TEMP_REPAINT_RECT); @@ -160,6 +160,17 @@ repaintFrom(TEMP_REPAINT_RECT, repaintedLayer); } } + + /** + * @deprected since a more specific repaintFromLayer method is available + * + * Repaint from one of the cameras layers. The repaint region needs to be + * transformed from view to local in this case. Unlike most repaint methods + * in piccolo this one must not modify the viewBounds parameter. + */ + public void repaintFromLayer(PBounds viewBounds, PNode repaintedLayer) { + this.repaintFromLayer(viewBounds, (PLayer)repaintedLayer); + } // **************************************************************** // Layers diff --git a/core/src/test/java/edu/umd/cs/piccolo/PLayerTest.java b/core/src/test/java/edu/umd/cs/piccolo/PLayerTest.java index e83a0a2..7ba732e 100644 --- a/core/src/test/java/edu/umd/cs/piccolo/PLayerTest.java +++ b/core/src/test/java/edu/umd/cs/piccolo/PLayerTest.java @@ -123,7 +123,7 @@ List notifications = new ArrayList(); - public void repaintFromLayer(PBounds bounds, PNode layer) { + public void repaintFromLayer(PBounds bounds, PLayer layer) { notifications.add(new Notification("repaintFromLayer", bounds, layer)); super.repaintFromLayer(bounds, layer); }