to save up a progress
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user