diff --git a/colorm.go b/colorm.go index 12b8b43a7..f76ba5946 100644 --- a/colorm.go +++ b/colorm.go @@ -44,12 +44,12 @@ type ColorM struct { es [ColorMDim - 1][ColorMDim]float64 } -func (c ColorM) dim() int { +func (c *ColorM) dim() int { return ColorMDim } // Element returns a value of a matrix at (i, j). -func (c ColorM) Element(i, j int) float64 { +func (c *ColorM) Element(i, j int) float64 { if !c.initialized { if i == j { return 1 diff --git a/geom.go b/geom.go index 84e721445..f97fa3415 100644 --- a/geom.go +++ b/geom.go @@ -37,12 +37,12 @@ type GeoM struct { es [GeoMDim - 1][GeoMDim]float64 } -func (g GeoM) dim() int { +func (g *GeoM) dim() int { return GeoMDim } // Element returns a value of a matrix at (i, j). -func (g GeoM) Element(i, j int) float64 { +func (g *GeoM) Element(i, j int) float64 { if !g.initialized { if i == j { return 1 diff --git a/image.go b/image.go index ac6086b35..dc04c1441 100644 --- a/image.go +++ b/image.go @@ -67,7 +67,7 @@ func (i *innerImage) drawImage(c *opengl.Context, img *innerImage, options *Draw clr := options.ColorM w, h := img.size() quads := &textureQuads{parts, w, h} - return i.framebuffer.DrawTexture(c, img.texture, quads, geo, clr) + return i.framebuffer.DrawTexture(c, img.texture, quads, &geo, &clr) } func u(x float64, width int) float32 {