mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
Remove New*Matrix
This commit is contained in:
parent
ec6dc4b7ec
commit
d46e551c5c
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user