remove PictureData.SetColor

was confusing since Pictures in e.g. Sprites are not really updatable
This commit is contained in:
faiface 2017-04-26 15:04:46 +02:00
parent 5371f8a2dc
commit 4cff721955
1 changed files with 0 additions and 14 deletions

14
data.go
View File

@ -268,17 +268,3 @@ func (pd *PictureData) Color(at Vec) RGBA {
}
return ToRGBA(pd.Pix[pd.Index(at)])
}
// SetColor changes the color located at the given position.
func (pd *PictureData) SetColor(at Vec, col color.Color) {
if !pd.Rect.Contains(at) {
return
}
rgba := ToRGBA(col)
pd.Pix[pd.Index(at)] = color.RGBA{
R: uint8(rgba.R * 255),
G: uint8(rgba.G * 255),
B: uint8(rgba.B * 255),
A: uint8(rgba.A * 255),
}
}