Przeglądaj źródła

Change ordering

jst 13 lat temu
rodzic
commit
2d6edc049a
1 zmienionych plików z 10 dodań i 10 usunięć
  1. 10 10
      converter.go

+ 10 - 10
converter.go

@@ -23,16 +23,6 @@ import (
 
 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 {
 	if x < min {
 		x = min
@@ -49,6 +39,16 @@ func replicateBorder(x, y int, rect image.Rectangle) (xx, yy int) {
 	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 {
 	r, g, b, a := c.src.At(replicateBorder(x, y, c.src.Bounds())).RGBA()
 	return colorArray{