diff options
Diffstat (limited to 'src/jrummikub')
-rw-r--r-- | src/jrummikub/view/impl/StonePainter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jrummikub/view/impl/StonePainter.java b/src/jrummikub/view/impl/StonePainter.java index c644ea1..6b7e402 100644 --- a/src/jrummikub/view/impl/StonePainter.java +++ b/src/jrummikub/view/impl/StonePainter.java @@ -128,14 +128,14 @@ class StonePainter { * @return the width of a stone in the current scale in pixels */ public int getStoneWidth() { - return even(DEFAULT_WIDTH * scale); + return Math.max(even(DEFAULT_WIDTH * scale), 1); } /** * @return the height of a stone in the current scale in pixels */ public int getStoneHeight() { - return (int) (DEFAULT_WIDTH * scale / ASPECT_RATIO); + return Math.max((int) (DEFAULT_WIDTH * scale / ASPECT_RATIO), 1); } private BufferedImage prepaintStone(Color fg, Color bg, int value) { |