From eb53dad69b3d99f3b793bcb6e23bc630cd1bbf35 Mon Sep 17 00:00:00 2001 From: lordwelch Date: Thu, 17 May 2018 12:39:42 -0700 Subject: [PATCH] Move string anchor points to bottom left for consistency --- context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context.go b/context.go index 3d973b8..bcd87a6 100644 --- a/context.go +++ b/context.go @@ -698,7 +698,7 @@ func (dc *Context) DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing h := float64(len(lines)) * dc.fontHeight * lineSpacing h -= (lineSpacing - 1) * dc.fontHeight x -= ax * width - y -= ay * h + y += ay * h switch align { case AlignLeft: ax = 0 @@ -709,7 +709,7 @@ func (dc *Context) DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing ax = 1 x += width } - ay = 1 + ay = 0 for _, line := range lines { dc.DrawStringAnchored(line, x, y, ax, ay) y += dc.fontHeight * lineSpacing