mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:00:55 +00:00
fix #2161
This commit is contained in:
parent
2b7dd85b92
commit
c16507607c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user