diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java index b436b19b94..83b40bae2d 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java @@ -95,6 +95,7 @@ public class WorldMapOverlay extends Overlay // in fixed, the bounds are offset by the size of the black borders outside the canvas canvasBounds.setLocation(0, 0); final Area canvasViewArea = getWorldMapClipArea(canvasBounds); + Area currentClip = null; WorldMapPoint tooltipPoint = null; @@ -113,10 +114,19 @@ public class WorldMapOverlay extends Overlay continue; } - if (worldPoint.isSnapToEdge()) + if (worldPoint.isSnapToEdge() && canvasViewArea != currentClip) { graphics.setClip(canvasViewArea); + currentClip = canvasViewArea; + } + else if (!worldPoint.isSnapToEdge() && mapViewArea != currentClip) + { + graphics.setClip(mapViewArea); + currentClip = mapViewArea; + } + if (worldPoint.isSnapToEdge()) + { if (worldMapRectangle.contains(drawPoint.getX(), drawPoint.getY())) { if (worldPoint.isCurrentlyEdgeSnapped()) @@ -135,10 +145,6 @@ public class WorldMapOverlay extends Overlay } } } - else - { - graphics.setClip(mapViewArea); - } int drawX = drawPoint.getX(); int drawY = drawPoint.getY();