test: add test for axis

This commit is contained in:
vicanso 2022-06-18 10:38:46 +08:00
parent 635e440e85
commit d3c6649cd9
12 changed files with 145 additions and 40 deletions

View file

@ -41,7 +41,7 @@ type Painter struct {
}
type PainterOptions struct {
// Draw type, "svg" or "png", default type is "svg"
// Draw type, "svg" or "png", default type is "png"
Type string
// The width of draw painter
Width int
@ -628,7 +628,7 @@ func (p *Painter) MultiText(opt MultiTextOption) *Painter {
values = autoDivide(width, count)
}
for index, text := range opt.TextList {
if index%opt.Unit != 0 {
if opt.Unit != 0 && index%opt.Unit != 0 {
continue
}
box := p.MeasureText(text)