aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2009-02-22 12:02:40 +0000
committerSimon Tatham <anakin@pobox.com>2009-02-22 12:02:40 +0000
commit9249f096192b0a50e607024bf04736ef0506b5ea (patch)
treeb9d14f4e9a7f1e4e6c80fd7f5e72571ee86fa736
parent5027095ce2a6dd844ce10489c91dc08bbc174a19 (diff)
downloadpuzzles-9249f096192b0a50e607024bf04736ef0506b5ea.zip
puzzles-9249f096192b0a50e607024bf04736ef0506b5ea.tar.gz
puzzles-9249f096192b0a50e607024bf04736ef0506b5ea.tar.bz2
puzzles-9249f096192b0a50e607024bf04736ef0506b5ea.tar.xz
Fix the Java front end's vertical text positioning when
ALIGN_VNORMAL is in use: ALIGN_VNORMAL indicates that the supplied y-coordinate denotes the _baseline_ of the text, not its top, so adding on 'asc' to convert to the baseline is wrong. This only affects Tents, at present. [originally from svn r8452]
-rw-r--r--PuzzleApplet.java2
1 files changed, 0 insertions, 2 deletions
diff --git a/PuzzleApplet.java b/PuzzleApplet.java
index 23eda81..f401ecf 100644
--- a/PuzzleApplet.java
+++ b/PuzzleApplet.java
@@ -382,8 +382,6 @@ public class PuzzleApplet extends JApplet implements Runtime.CallJavaCB {
int asc = fm.getAscent(), desc = fm.getDescent();
if ((xarg3 & ALIGN_VCENTRE) != 0)
xarg2 += asc - (asc+desc)/2;
- else
- xarg2 += asc;
int wid = fm.stringWidth(text);
if ((xarg3 & ALIGN_HCENTRE) != 0)
xarg1 -= wid / 2;