Skip to content

Commit

Permalink
perspective: use viewport offset for offsetting rectangle in get2DGeo…
Browse files Browse the repository at this point in the history
…metry
  • Loading branch information
Adam- committed May 30, 2018
1 parent efab859 commit 4b18dce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runelite-api/src/main/java/net/runelite/api/Perspective.java
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,10 @@ private static Area get2DGeometry(
// ...and the rectangles in the fixed client are shifted 4 pixels right and down
if (!client.isResized())
{
minX += 4;
minY += 4;
maxX += 4;
maxY += 4;
minX += client.getViewportXOffset();
minY += client.getViewportYOffset();
maxX += client.getViewportXOffset();
maxY += client.getViewportYOffset();
}

Rectangle clickableRect = new Rectangle(
Expand Down

0 comments on commit 4b18dce

Please sign in to comment.