affine: Remove ebiten.Monochrome usages

This commit is contained in:
Hajime Hoshi 2018-02-12 18:18:32 +09:00
parent c4f02ac07c
commit 3da09c493a
2 changed files with 4 additions and 2 deletions

View File

@ -131,7 +131,8 @@ func TestColorMMonochrome(t *testing.T) {
{0.2990, 0.5870, 0.1140, 0, 0},
{0, 0, 0, 1, 0},
}
m := Monochrome()
m := ColorM{}
m.ChangeHSV(0, 0, 1)
for i := 0; i < 4; i++ {
for j := 0; j < 5; j++ {
got := m.Element(i, j)

View File

@ -167,7 +167,8 @@ func (s *GameScene) drawBackground(r *ebiten.Image) {
op.GeoM.Translate(ScreenWidth/2, ScreenHeight/2)
a := 0.7
m := ebiten.Monochrome()
m := ebiten.ColorM{}
m.ChangeHSV(0, 0, 1)
m.Scale(a, a, a, a)
op.ColorM.Scale(1-a, 1-a, 1-a, 1-a)
op.ColorM.Add(m)