# HG changeset patch # User Matti Hamalainen # Date 1556196617 -10800 # Node ID 54dd56b9bee64955bad8aa273763a607d7def915 # Parent bd3cde4bc15cc603b079066d90e0da8a699faaed Some work on board scaling. diff -r bd3cde4bc15c -r 54dd56b9bee6 game/Engine.java --- a/game/Engine.java Thu Apr 25 12:58:17 2019 +0300 +++ b/game/Engine.java Thu Apr 25 15:50:17 2019 +0300 @@ -215,8 +215,8 @@ g.setPaint(new Color(0.0f, 0.0f, 0.0f, 0.2f)); g.setStroke(new BasicStroke(5.0f)); g.draw(new RoundRectangle2D.Float(getScaledX(), getScaledY(), - boardSize * pscale, boardSize * pscale, - pscale / 5, pscale / 5)); + boardSize * pscale * scale.x, boardSize * pscale * scale.y, + pscale * scale.x / 5, pscale * scale.y / 5)); } public void paintBoard(Graphics2D g, boolean drawCurrent) @@ -229,8 +229,8 @@ (!drawCurrent && board[x][y] != currPiece)) { board[x][y].paint(g, - getScaledX() + (x * pscale), - getScaledY() + (y * pscale), + getScaledX() + (x * pscale * scale.x), + getScaledY() + (y * pscale * scale.y), pscale - pscale / 10); } }