mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-12 22:17:26 +01:00
20 lines
410 B
Go
20 lines
410 B
Go
package graphics
|
|
|
|
type ColorMatrix struct {
|
|
AffineMatrix
|
|
}
|
|
|
|
const colorMatrixDimension = 5
|
|
|
|
func NewColorMatrix() *ColorMatrix {
|
|
return &ColorMatrix{*NewAffineMatrix(colorMatrixDimension)}
|
|
}
|
|
|
|
func IdentityColorMatrix() *ColorMatrix {
|
|
return &ColorMatrix{*IdentityAffineMatrix(colorMatrixDimension)}
|
|
}
|
|
|
|
func (matrix *ColorMatrix) Clone() *ColorMatrix {
|
|
return &ColorMatrix{*(matrix.AffineMatrix.Clone())}
|
|
}
|