From 6e494abbdf0fdad423fa43b3a38c119e208d2f4a Mon Sep 17 00:00:00 2001 From: Usman Ismail <61712645+usmanismail-bolt@users.noreply.github.com> Date: Tue, 19 Apr 2022 14:06:20 -0400 Subject: [PATCH] Missing Alignment Option For text I think this was just missed, When we do TextRotationDegrees the text does not align with the bottom of the bar. This change seems to fix it. --- draw.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/draw.go b/draw.go index e188079..69608fd 100644 --- a/draw.go +++ b/draw.go @@ -300,6 +300,8 @@ func (d draw) TextWithin(r Renderer, text string, box Box, style Style) { y = y + (box.Height() >> 1) - (linesBox.Height() >> 1) case TextVerticalAlignMiddleBaseline: y = y + (box.Height() >> 1) - linesBox.Height() + case TextVerticalAlignTop: + y = y + box.Height() } var tx, ty int