From 14abc28d3ab97ee7d8976f11019fe5a38b150ea0 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 27 Jan 2021 02:37:37 +0900 Subject: [PATCH] internal/color: Remove Add --- internal/affine/colorm.go | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/internal/affine/colorm.go b/internal/affine/colorm.go index b112883a4..06072d675 100644 --- a/internal/affine/colorm.go +++ b/internal/affine/colorm.go @@ -438,43 +438,6 @@ func (c *ColorM) Concat(other *ColorM) *ColorM { } } -// Add is deprecated. -func (c *ColorM) Add(other *ColorM) *ColorM { - lhsb := colorMIdentityBody - lhst := colorMIdentityTranslate - rhsb := colorMIdentityBody - rhst := colorMIdentityTranslate - if other.isInited() { - if other.body != nil { - lhsb = other.body - } - if other.translate != nil { - lhst = other.translate - } - } - if c.isInited() { - if c.body != nil { - rhsb = c.body - } - if c.translate != nil { - rhst = c.translate - } - } - - newC := &ColorM{ - body: make([]float32, 16), - translate: make([]float32, 4), - } - for i := range lhsb { - newC.body[i] = lhsb[i] + rhsb[i] - } - for i := range lhst { - newC.translate[i] = lhst[i] + rhst[i] - } - - return newC -} - // Scale scales the matrix by (r, g, b, a). func (c *ColorM) Scale(r, g, b, a float32) *ColorM { if !c.isInited() {