mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
affine: Remove ebiten.Monochrome usages
This commit is contained in:
parent
c4f02ac07c
commit
3da09c493a
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user