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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user