minor change

This commit is contained in:
faiface 2017-01-05 14:50:09 +01:00
parent 5baac913c8
commit 29871f72f1
1 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,9 @@ func (c NRGBA) RGBA() (r, g, b, a uint32) {
}
// NRGBAModel converts colors to NRGBA format.
var NRGBAModel = color.ModelFunc(func(c color.Color) color.Color {
var NRGBAModel = color.ModelFunc(nrgbaModel)
func nrgbaModel(c color.Color) color.Color {
if c, ok := c.(NRGBA); ok {
return c
}
@ -80,4 +82,4 @@ var NRGBAModel = color.ModelFunc(func(c color.Color) color.Color {
float64(b) / float64(a),
float64(a) / 0xffff,
}
})
}