fix color masking in Canvas.Clear

This commit is contained in:
faiface 2017-03-08 15:02:40 +01:00
parent 43aae3d3bd
commit 907082326f
1 changed files with 8 additions and 0 deletions

View File

@ -219,6 +219,14 @@ func (c *Canvas) Clear(color color.Color) {
nrgba := pixel.NRGBAModel.Convert(color).(pixel.NRGBA)
// color masking
nrgba = nrgba.Mul(pixel.NRGBA{
R: float64(c.col[0]),
G: float64(c.col[1]),
B: float64(c.col[2]),
A: float64(c.col[3]),
})
mainthread.CallNonBlock(func() {
c.setGlhfBounds()
c.f.Begin()