From 92588c886807f368af47273661574e262cf2eb06 Mon Sep 17 00:00:00 2001 From: Bart van Helvert Date: Thu, 8 Mar 2018 01:40:15 +0100 Subject: [PATCH] More accurately draw tiles to canvas Fixes a problem where the coordinates of the bottom right and bottom left corner of a canvas tile would lie on the neighbouring tiles. --- runelite-api/src/main/java/net/runelite/api/Perspective.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/Perspective.java b/runelite-api/src/main/java/net/runelite/api/Perspective.java index dc7d6c2502..8a0e44c1e0 100644 --- a/runelite-api/src/main/java/net/runelite/api/Perspective.java +++ b/runelite-api/src/main/java/net/runelite/api/Perspective.java @@ -349,8 +349,8 @@ public class Perspective Point topLeft = new Point(localLocation.getX() - (aoeSize * LOCAL_TILE_SIZE) - halfTile, localLocation.getY() - (aoeSize * LOCAL_TILE_SIZE) - halfTile); // expand by size - Point bottomRight = new Point(topLeft.getX() + size * LOCAL_TILE_SIZE, - topLeft.getY() + size * LOCAL_TILE_SIZE); + Point bottomRight = new Point(topLeft.getX() + size * LOCAL_TILE_SIZE - 1, + topLeft.getY() + size * LOCAL_TILE_SIZE - 1); // Take the x of top left and the y of bottom right to create bottom left Point bottomLeft = new Point(topLeft.getX(), bottomRight.getY()); // Similarly for top right