From 5080469db3c8e85caa768da3f6d5b8050013900d Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 22 Feb 2009 12:02:40 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8452 cda61777-01e9-0310-a592-d414129be87e --- PuzzleApplet.java | 2 -- 1 file changed, 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; -- 2.11.0