From 3eae312798019445758c23530344be8c71138f9b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 10 May 2011 05:09:47 +0200 Subject: 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 --- src/jrummikub/view/impl/StonePainter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/jrummikub') 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); -- cgit v1.2.3