From bffb5d6b41f409258a2f0c126a04127f31e28a06 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 13 Jun 2021 14:38:01 +0800 Subject: make the caller of `getRowHeight` function adapt row number change, update comment: use rows number instead of rows index. --- picture.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'picture.go') 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) } } -- cgit v1.2.1