summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-10 05:09:47 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-10 05:09:47 +0200
commit3eae312798019445758c23530344be8c71138f9b (patch)
tree1e671ba6482dc7e71a4d0c1c1200531598c07c2a /src/jrummikub/view/impl
parent0e1ddcd8da6c1218fdc7ef4e54e2772b613a6361 (diff)
downloadJRummikub-3eae312798019445758c23530344be8c71138f9b.tar
JRummikub-3eae312798019445758c23530344be8c71138f9b.zip
Don't draw stone value shadow for small scales
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@223 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r--src/jrummikub/view/impl/StonePainter.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jrummikub/view/impl/StonePainter.java b/src/jrummikub/view/impl/StonePainter.java
index d6acd09..a17c479 100644
--- a/src/jrummikub/view/impl/StonePainter.java
+++ b/src/jrummikub/view/impl/StonePainter.java
@@ -287,10 +287,12 @@ class StonePainter {
String value = Integer.toString(v);
Rectangle2D stringRect = fm.getStringBounds(value, g);
- g.setColor(color.darker());
- g.drawString(value,
- (int) (r.x + r.width / 2 - stringRect.getWidth() / 2) + 1,
- pos + (fm.getAscent() - fm.getDescent()) / 2 + 1);
+ if (scale > 1) {
+ g.setColor(color.darker());
+ g.drawString(value,
+ (int) (r.x + r.width / 2 - stringRect.getWidth() / 2) + 1,
+ pos + (fm.getAscent() - fm.getDescent()) / 2 + 1);
+ }
g.setColor(color);
g.drawString(value, (int) (r.x + r.width / 2 - stringRect.getWidth() / 2),
pos + (fm.getAscent() - fm.getDescent()) / 2);