snapshot
This commit is contained in:
parent
3cb33d48d3
commit
26eaa1d898
76 changed files with 1076 additions and 1717 deletions
4
text.go
4
text.go
|
|
@ -2,8 +2,6 @@ package chart
|
|||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
util "github.com/wcharczuk/go-chart/util"
|
||||
)
|
||||
|
||||
// TextHorizontalAlign is an enum for the horizontal alignment options.
|
||||
|
|
@ -149,7 +147,7 @@ func (t text) MeasureLines(r Renderer, lines []string, style Style) Box {
|
|||
var output Box
|
||||
for index, line := range lines {
|
||||
lineBox := r.MeasureText(line)
|
||||
output.Right = util.Math.MaxInt(lineBox.Right, output.Right)
|
||||
output.Right = MaxInt(lineBox.Right, output.Right)
|
||||
output.Bottom += lineBox.Height()
|
||||
if index < len(lines)-1 {
|
||||
output.Bottom += +style.GetTextLineSpacing()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue