Change ordering

This commit is contained in:
jst 2012-12-11 19:57:34 +01:00
parent cfcbeb4bb2
commit 2d6edc049a

View File

@ -23,16 +23,6 @@ import (
type colorArray [4]float32 type colorArray [4]float32
// converter allows to retrieve
// a colorArray for points of an image
type converter interface {
at(x, y int) colorArray
}
type genericConverter struct {
src image.Image
}
func replicateBorder1d(x, min, max int) int { func replicateBorder1d(x, min, max int) int {
if x < min { if x < min {
x = min x = min
@ -49,6 +39,16 @@ func replicateBorder(x, y int, rect image.Rectangle) (xx, yy int) {
return return
} }
// converter allows to retrieve
// a colorArray for points of an image.
type converter interface {
at(x, y int) colorArray
}
type genericConverter struct {
src image.Image
}
func (c *genericConverter) at(x, y int) colorArray { func (c *genericConverter) at(x, y int) colorArray {
r, g, b, a := c.src.At(replicateBorder(x, y, c.src.Bounds())).RGBA() r, g, b, a := c.src.At(replicateBorder(x, y, c.src.Bounds())).RGBA()
return colorArray{ return colorArray{