Remove New*Matrix

This commit is contained in:
Hajime Hoshi 2014-12-26 11:31:20 +09:00
parent ec6dc4b7ec
commit d46e551c5c
2 changed files with 4 additions and 14 deletions

View File

@ -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
}

View File

@ -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
}