diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-02-28 12:59:04 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-02-28 12:59:04 +0800 |
commit | 1e340aea40085133ffb98ed7635d937aa977f177 (patch) | |
tree | add4ce58cdefe884b6e362e9e1c6bb92deaccf16 /README.md | |
parent | 4b8b410f523993520c133200dacc44d5311b9fd5 (diff) |
Change function `AddPicture()` parameters to add add printing settings support. Related issue #27.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -109,17 +109,17 @@ func main() { os.Exit(1) } // Insert a picture. - err = xlsx.AddPicture("Sheet1", "A2", "/tmp/image1.gif", 0, 0, 1, 1) + err = xlsx.AddPicture("Sheet1", "A2", "/tmp/image1.gif", "") if err != nil { fmt.Println(err) } // Insert a picture to sheet with scaling. - err = xlsx.AddPicture("Sheet1", "D2", "/tmp/image2.jpg", 0, 0, 0.5, 0.5) + err = xlsx.AddPicture("Sheet1", "D2", "/tmp/image2.jpg", `{"x_scale": 0.5, "y_scale": 0.5}`) if err != nil { fmt.Println(err) } - // Insert a picture offset in the cell. - err = xlsx.AddPicture("Sheet1", "H2", "/tmp/image3.png", 15, 10, 1, 1) + // Insert a picture offset in the cell with printing support. + err = xlsx.AddPicture("Sheet1", "H2", "/tmp/image3.gif", `{"x_offset": 15, "y_offset": 10, "print_obj": true, "lock_aspect_ratio": false, "locked": false}`) if err != nil { fmt.Println(err) } |