This commit is contained in:
astaxie 2016-09-15 11:11:34 +08:00
parent 2b7dd85b92
commit c16507607c
1 changed files with 3 additions and 0 deletions

View File

@ -359,6 +359,9 @@ func (m *Image) calculateSizes(width, height, ncount int) {
}
// Calculate dot size.
m.dotSize = int(nh / fh)
if m.dotSize < 1 {
m.dotSize = 1
}
// Save everything, making the actual width smaller by 1 dot to account
// for spacing between digits.
m.numWidth = int(nw) - m.dotSize