tweaks.
This commit is contained in:
parent
cbc0002d2a
commit
a008ebe30e
5 changed files with 27 additions and 10 deletions
2
draw.go
2
draw.go
|
|
@ -245,7 +245,7 @@ func (d draw) TextWithin(r Renderer, text string, box Box, style Style) {
|
|||
lineBox := r.MeasureText(line)
|
||||
switch style.GetTextHorizontalAlign() {
|
||||
case TextHorizontalAlignCenter:
|
||||
tx = box.Left + ((lineBox.Width() - box.Left) >> 1)
|
||||
tx = box.Left + ((box.Width() - lineBox.Width()) >> 1)
|
||||
case TextHorizontalAlignRight:
|
||||
tx = box.Right - lineBox.Width()
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue