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:
parent
c1468e8ae4
commit
6e494abbdf
1 changed files with 2 additions and 0 deletions
2
draw.go
2
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
|
||||
|
|
Loading…
Reference in a new issue