From 8e5d61c6ace613e8c28c159efee5c86db8caa62b Mon Sep 17 00:00:00 2001 From: Andreas Fuchs <asf@boinkor.net> Date: Wed, 9 Sep 2009 15:18:16 +0200 Subject: [PATCH] spr36162: Fix :align-y :bottom and :center text positioning. --- ChangeLog.n | 6 ++++++ tk-silica/xt-graphics.lisp | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.n b/ChangeLog.n index 6848d961..29692847 100644 --- a/ChangeLog.n +++ b/ChangeLog.n @@ -3,6 +3,11 @@ don't forget to change the version in utils/packages.lisp if you do anything user visible. ******************************************************************************* +2009-09-09 Andreas Fuchs <afuchs@franz.com> + + * tk-silica/xt-graphics.lisp: Fix vertical alignment offset calculation for :bottom + and :center. (spr36162) + 2009-09-09 Andreas Fuchs <afuchs@franz.com> * tk-silica/xt-silica.lisp: Try to query fonts before loading them, as we get @@ -13,6 +18,7 @@ user visible. * tk-silica/xt-graphics: Make sure that drawing rotated text plays nice with :align-x and :align-y. These are relative to the text baseline, which may be rotated, so compute bounding box and text offset after the rotation. + (spr36162) 2009-08-12 Andreas Fuchs <afuchs@franz.com> diff --git a/tk-silica/xt-graphics.lisp b/tk-silica/xt-graphics.lisp index 27c1f602..8ade7366 100644 --- a/tk-silica/xt-graphics.lisp +++ b/tk-silica/xt-graphics.lisp @@ -1502,9 +1502,8 @@ (:center (floor width 2)) (:left 0)) (ecase align-y - (:bottom (- height baseline)) - (:center (- (floor height 2) - baseline)) + (:bottom (- baseline height)) + (:center (- baseline (floor height 2))) (:baseline 0) (:top baseline)))) -- GitLab