add Window.Color

This commit is contained in:
faiface 2017-04-02 19:08:48 +02:00
parent 46c8784df0
commit 1a2ca3264d
1 changed files with 5 additions and 0 deletions

View File

@ -397,3 +397,8 @@ func (w *Window) Smooth() bool {
func (w *Window) Clear(c color.Color) { func (w *Window) Clear(c color.Color) {
w.canvas.Clear(c) w.canvas.Clear(c)
} }
// Color returns the color of the pixel over the given position inside the Window.
func (w *Window) Color(at pixel.Vec) pixel.NRGBA {
return w.canvas.Color(at)
}