23 lines
321 B
Go
23 lines
321 B
Go
package mirror
|
|
|
|
import (
|
|
"image"
|
|
"image/color"
|
|
)
|
|
|
|
type Mirror struct {
|
|
image.Image
|
|
}
|
|
|
|
func (m Mirror) ColorModel() color.Model {
|
|
return m.Image.ColorModel()
|
|
}
|
|
|
|
func (m Mirror) Bounds() image.Rectangle {
|
|
return m.Image.Bounds()
|
|
}
|
|
|
|
func (m Mirror) At(x, y int) color.Color {
|
|
return m.Image.At(m.Bounds().Dx()-x, y)
|
|
}
|