From d46e551c5cbb7532b7bfe9dfd9cc8f6879df28d7 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 26 Dec 2014 11:31:20 +0900 Subject: [PATCH] Remove New*Matrix --- colormatrix.go | 9 ++------- geometrymatrix.go | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/colormatrix.go b/colormatrix.go index f86fa2bdc..e04bda607 100644 --- a/colormatrix.go +++ b/colormatrix.go @@ -27,6 +27,8 @@ const ColorMatrixDim = 5 // while an Image's pixels' format is alpha premultiplied. // Before applying a matrix, a color is un-multiplied, and after applying the matrix, // the color is multiplied again. +// +// The initial value is identity. type ColorMatrix struct { // es represents elements. es *[ColorMatrixDim - 1][ColorMatrixDim]float64 @@ -41,13 +43,6 @@ func colorMatrixEsI() *[ColorMatrixDim - 1][ColorMatrixDim]float64 { } } -// NewColorMatrix returns an identity color matrix. -func NewColorMatrix() ColorMatrix { - return ColorMatrix{ - es: colorMatrixEsI(), - } -} - func (c ColorMatrix) dim() int { return ColorMatrixDim } diff --git a/geometrymatrix.go b/geometrymatrix.go index d7449df16..a54d72c8b 100644 --- a/geometrymatrix.go +++ b/geometrymatrix.go @@ -22,6 +22,8 @@ import ( const GeometryMatrixDim = 3 // A GeometryMatrix represents a matrix to transform geometry when rendering an image. +// +// The initial value is identity. type GeometryMatrix struct { // es represents elements. es *[GeometryMatrixDim - 1][GeometryMatrixDim]float64 @@ -34,13 +36,6 @@ func geometryMatrixEsI() *[GeometryMatrixDim - 1][GeometryMatrixDim]float64 { } } -// NewGeometryMatrix returns an identity geometry matrix. -func NewGeometryMatrix() GeometryMatrix { - return GeometryMatrix{ - es: geometryMatrixEsI(), - } -} - func (g GeometryMatrix) dim() int { return GeometryMatrixDim }