Index: applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersLayer.java
===================================================================
--- applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersLayer.java	(revision 18542)
+++ applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersLayer.java	(revision 18597)
@@ -5,5 +5,5 @@
 import java.awt.Color;
 import java.awt.Component;
-import java.awt.Graphics;
+import java.awt.Graphics2D;
 import java.awt.Image;
 import java.awt.Point;
@@ -30,9 +30,9 @@
 /**
  * Class that displays a slippy map layer. Adapted from SlippyMap plugin for Walking Papers use.
- * 
+ *
  * @author Frederik Ramm <frederik@remote.org>
  * @author LuVar <lubomir.varga@freemap.sk>
  * @author Dave Hansen <dave@sr71.net>
- * 
+ *
  */
 public class WalkingPapersLayer extends Layer implements ImageObserver {
@@ -55,5 +55,5 @@
 	private String tileUrlTemplate;
 	private String walkingPapersId;
-	
+
 	@SuppressWarnings("serial")
 	public WalkingPapersLayer(String id, String tile, Bounds b, int minz, int maxz) {
@@ -66,7 +66,7 @@
 		this.minzoom = minz; this.maxzoom = maxz;
 		currentZoomLevel = minz;
-		
+
 		clearTileStorage();
-		
+
 	    Layer.listeners.add(new LayerChangeListener() {
 	        public void activeLayerChange(Layer oldLayer, Layer newLayer) {
@@ -182,8 +182,8 @@
      */
 	@Override
-	public void paint(Graphics g, MapView mv) {
+	public void paint(Graphics2D g, MapView mv, Bounds bounds) {
 		LatLon topLeft = mv.getLatLon(0, 0);
 		LatLon botRight = mv.getLatLon(mv.getWidth(), mv.getHeight());
-		Graphics oldg = g;
+		Graphics2D oldg = g;
 
 		if (botRight.lon() == 0.0 || botRight.lat() == 0) {
@@ -200,10 +200,10 @@
 			return;
 		}
-		
+
 		needRedraw = false;
 		lastTopLeft = topLeft;
 		lastBotRight = botRight;
 		bufferImage = mv.createImage(mv.getWidth(), mv.getHeight());
-		g = bufferImage.getGraphics();
+		g = (Graphics2D) bufferImage.getGraphics();
 
         if (!LatLon.isValidLat(topLeft.lat())  ||
@@ -228,5 +228,5 @@
 			viewportMaxY = tmp;
 		}
-		
+
 		if (viewportMaxX-viewportMinX > 18) return;
 		if (viewportMaxY-viewportMinY > 18) return;
@@ -255,5 +255,5 @@
 				if (tile == null) {
 					// check if tile is in range
-					Bounds tileBounds = new Bounds(new LatLon(tileYToLat(y+1), tileXToLon(x)), 
+					Bounds tileBounds = new Bounds(new LatLon(tileYToLat(y+1), tileXToLon(x)),
 						new LatLon(tileYToLat(y), tileXToLon(x+1)));
 					if (!tileBounds.asRect().intersects(printBounds.asRect())) continue;
@@ -275,5 +275,5 @@
 			}
 		}
-		
+
 		if (count == 0)
 		{
@@ -283,5 +283,5 @@
 
 		oldg.drawImage(bufferImage, 0, 0, null);
-		
+
 		if (imageScale != null) {
 			// If each source image pixel is being stretched into > 3
@@ -289,5 +289,5 @@
 			if (imageScale > 3) {
 				increaseZoomLevel();
-				this.paint(oldg, mv);
+				this.paint(oldg, mv, bounds);
 			}
 
@@ -296,7 +296,7 @@
 			else if (imageScale < 0.32) {
 				decreaseZoomLevel();
-				this.paint(oldg, mv);
-			}
-		}	
+				this.paint(oldg, mv, bounds);
+			}
+		}
 	}// end of paint metod
 
@@ -310,7 +310,7 @@
 			}
 		}
-		
+
 		if (tilex == -1) return null;
-		
+
 		for (int y = viewportMinY; y <= viewportMaxY; y++) {
 			if (pixelpos[0][y - viewportMinY + 1].y > py) {
@@ -319,5 +319,5 @@
 			}
 		}
-		
+
 		if (tiley == -1) return null;
 
@@ -411,9 +411,9 @@
 		Main.pref.listener.remove(WalkingPapersLayer.this);
 	}
-	
+
 	public String getWalkingPapersId() {
 		return walkingPapersId;
 	}
-	
+
 	public URL formatImageUrl(int x, int y, int z) {
 		String urlstr = tileUrlTemplate.
@@ -427,4 +427,4 @@
 		}
 	}
-	
+
 }
