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.
This commit is contained in:
Usman Ismail 2022-04-19 14:06:20 -04:00 committed by GitHub
parent c1468e8ae4
commit 6e494abbdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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