summaryrefslogtreecommitdiff
path: root/picture.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-06-13 14:38:01 +0800
committerxuri <xuri.me@gmail.com>2021-06-13 14:38:01 +0800
commitbffb5d6b41f409258a2f0c126a04127f31e28a06 (patch)
treeb74428a7b8eb1fec5d53ba31c0212f7927522c15 /picture.go
parente354db69b0bdd02357c221af9ef09695dd8fd122 (diff)
make the caller of `getRowHeight` function adapt row number change, update comment: use rows number instead of rows index.
Diffstat (limited to 'picture.go')
-rw-r--r--picture.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/picture.go b/picture.go
index 92e0106..052ec83 100644
--- a/picture.go
+++ b/picture.go
@@ -618,10 +618,10 @@ func (f *File) drawingResize(sheet string, cell string, width, height float64, f
if inMergeCell {
cellWidth, cellHeight = 0, 0
c, r = rng[0], rng[1]
- for col := rng[0] - 1; col < rng[2]; col++ {
+ for col := rng[0]; col <= rng[2]; col++ {
cellWidth += f.getColWidth(sheet, col)
}
- for row := rng[1] - 1; row < rng[3]; row++ {
+ for row := rng[1]; row <= rng[3]; row++ {
cellHeight += f.getRowHeight(sheet, row)
}
}