test: add test for mark line

This commit is contained in:
vicanso 2022-02-12 14:04:08 +08:00
parent 51682069d7
commit 63d4b0e229
2 changed files with 100 additions and 1 deletions

View file

@ -85,7 +85,7 @@ func markLineRender(opt *markLineRenderOption) {
width := d.Box.Width()
text := commafWithDigits(value)
textBox := r.MeasureText(text)
d.makeLine(0, y, width)
d.makeLine(0, y, width-2)
d.text(text, width, y+textBox.Height()>>1-2)
}