Skip to content

Commit

Permalink
Image: use ints for image width and height
Browse files Browse the repository at this point in the history
  • Loading branch information
ajstarks committed May 7, 2017
1 parent 9f597be commit 2489f1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions float/svg.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ func (svg *SVG) Polyline(x []float64, y []float64, s ...string) {
// Image places at x,y (upper left hand corner), the image with
// width w, and height h, referenced at link, with optional style.
// Standard Reference: http://www.w3.org/TR/SVG11/struct.html#ImageElement
func (svg *SVG) Image(x float64, y float64, w float64, h float64, link string, s ...string) {
svg.printf(`<image %s %s %s`, dim(x, y, w, h, svg.Decimals), href(link), endstyle(s, emptyclose))
func (svg *SVG) Image(x float64, y float64, w int, h int, link string, s ...string) {
svg.printf(`<image %s %s %s`, dim(x, y, float64(w), float64(h), svg.Decimals), href(link), endstyle(s, emptyclose))
}

// Text places the specified text, t at x,y according to the style specified in s
Expand Down

0 comments on commit 2489f1e

Please sign in to comment.