summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/view')
-rw-r--r--src/jrummikub/view/impl/StonePainter.java4
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) {