Skip to content

Commit

Permalink
Revert "perspective: use viewport offset in get2DGeometry"
Browse files Browse the repository at this point in the history
This reverts commit 4559713.
  • Loading branch information
Adam- committed May 30, 2018
1 parent d2b18d2 commit efab859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runelite-api/src/main/java/net/runelite/api/Perspective.java
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ private static Area get2DGeometry(
int minY = Math.min(Math.min(a.getY(), b.getY()), c.getY());

// For some reason, this calculation is always 4 pixels short of the actual in-client one
int maxX = Math.max(Math.max(a.getX(), b.getX()), c.getX()) + client.getViewportXOffset();
int maxY = Math.max(Math.max(a.getY(), b.getY()), c.getY()) + client.getViewportYOffset();
int maxX = Math.max(Math.max(a.getX(), b.getX()), c.getX()) + 4;
int maxY = Math.max(Math.max(a.getY(), b.getY()), c.getY()) + 4;

// ...and the rectangles in the fixed client are shifted 4 pixels right and down
if (!client.isResized())
Expand Down

0 comments on commit efab859

Please sign in to comment.