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
This commit is contained in:
Matthias Schiffer 2011-05-10 05:09:47 +02:00
parent 0e1ddcd8da
commit 3eae312798

View file

@ -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);