graphics: Deprecated 'Add' func for affine matrices

This commit is contained in:
Hajime Hoshi 2016-12-20 02:41:19 +09:00
parent d80b213184
commit 1a1d7972c1
4 changed files with 4 additions and 30 deletions

View File

@ -39,7 +39,8 @@ func (c *ColorM) Concat(other ColorM) {
c.impl.Concat(other.impl)
}
// Add adds a color matrix with the other color matrix.
// Add is deprecated as of 1.5.0-alpha.
// Note that this doesn't make sense in terms of additions two affine matrices.
func (c *ColorM) Add(other ColorM) {
c.impl.Add(other.impl)
}

View File

@ -47,20 +47,6 @@ func TestColorInit(t *testing.T) {
}
}
}
m.Add(m)
for i := 0; i < ColorMDim-1; i++ {
for j := 0; j < ColorMDim; j++ {
got := m.Element(i, j)
want := 0.0
if i == j {
want = 2
}
if want != got {
t.Errorf("m.Element(%d, %d) = %f, want %f", i, j, got, want)
}
}
}
}
func TestColorAssign(t *testing.T) {

View File

@ -39,7 +39,8 @@ func (g *GeoM) Concat(other GeoM) {
g.impl.Concat(other.impl)
}
// Add adds a geometry matrix with the other geometry matrix.
// Add is deprecated as of 1.5.0-alpha.
// Note that this doesn't make sense in terms of additions two affine matrices.
func (g *GeoM) Add(other GeoM) {
g.impl.Add(other.impl)
}

View File

@ -33,20 +33,6 @@ func TestGeometryInit(t *testing.T) {
}
}
}
m.Add(m)
for i := 0; i < GeoMDim-1; i++ {
for j := 0; j < GeoMDim; j++ {
got := m.Element(i, j)
want := 0.0
if i == j {
want = 2
}
if want != got {
t.Errorf("m.Element(%d, %d) = %f, want %f", i, j, got, want)
}
}
}
}
func TestGeometryAssign(t *testing.T) {