Commit 691f01a8 authored by santiaago's avatar santiaago
Browse files

remove strokes from isogrids

fixes #32
parent 43219787
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ func IsogridsRandom(w http.ResponseWriter, key string, colors []color.RGBA, size
			}
			xs := []int{x1, x2, x3}
			ys := []int{y1, y2, y3}
			canvas.Polygon(xs, ys, fmt.Sprintf("stroke:black;stroke-width:2; %s", fillFromRGBA(randomColorFromArray(colors))))
			canvas.Polygon(xs, ys, fillFromRGBA(randomColorFromArray(colors)))

			var x11, x12, x13, y11, y12, y13 int
			if (xL % 2) == 0 {
@@ -57,7 +57,7 @@ func IsogridsRandom(w http.ResponseWriter, key string, colors []color.RGBA, size
			}
			xs1 := []int{x11, x12, x13}
			ys1 := []int{y11, y12, y13}
			canvas.Polygon(xs1, ys1, fmt.Sprintf("stroke:black;stroke-width:2; %s", fillFromRGBA(randomColorFromArray(colors))))
			canvas.Polygon(xs1, ys1, fillFromRGBA(randomColorFromArray(colors)))
		}
	}
	canvas.End()
@@ -113,7 +113,7 @@ func IsogridsRandomMirror(w http.ResponseWriter, key string, colors []color.RGBA
			xs1 := []int{x11, x12, x13}
			ys1 := []int{y11, y12, y13}
			fill2 := fillFromRGBA(randomColorFromArray(colors))
			canvas.Polygon(xs1, ys1, fmt.Sprintf("stroke:black;stroke-width:2; %s", fill2))
			canvas.Polygon(xs1, ys1, fill2)
			// apply mirror:
			xs[0] = (lines * fringeSize) - xs[0]
			xs[1] = (lines * fringeSize) - xs[1]
@@ -121,8 +121,8 @@ func IsogridsRandomMirror(w http.ResponseWriter, key string, colors []color.RGBA
			xs1[0] = (lines * fringeSize) - xs1[0]
			xs1[1] = (lines * fringeSize) - xs1[1]
			xs1[2] = (lines * fringeSize) - xs1[2]
			canvas.Polygon(xs, ys, fmt.Sprintf("stroke:black;stroke-width:2; %s", fill1))
			canvas.Polygon(xs1, ys1, fmt.Sprintf("stroke:black;stroke-width:2; %s", fill2))
			canvas.Polygon(xs, ys, fill1)
			canvas.Polygon(xs1, ys1, fill2)
		}
	}
	canvas.End()
@@ -158,7 +158,7 @@ func Isogrids(w http.ResponseWriter, key string, colors []color.RGBA, size int)
			xs := []int{x1, x2, x3}
			ys := []int{y1, y2, y3}
			fill1 := fillFromRGBA(colorFromKeyAndArray(key, colors, (xL+3*yL+lines)%15))
			canvas.Polygon(xs, ys, fmt.Sprintf("stroke:black;stroke-width:2; %s", fill1))
			canvas.Polygon(xs, ys, fill1)
			var x11, x12, x13, y11, y12, y13 int
			if (xL % 2) == 0 {
				x11 = (xL + 1) * fringeSize
@@ -178,7 +178,7 @@ func Isogrids(w http.ResponseWriter, key string, colors []color.RGBA, size int)
			xs1 := []int{x11, x12, x13}
			ys1 := []int{y11, y12, y13}
			fill2 := fillFromRGBA(colorFromKeyAndArray(key, colors, (xL+3*yL+1+lines)%15))
			canvas.Polygon(xs1, ys1, fmt.Sprintf("stroke:black;stroke-width:2; %s", fill2))
			canvas.Polygon(xs1, ys1, fill2)
			// apply mirror:
			xs[0] = (lines * fringeSize) - xs[0]
			xs[1] = (lines * fringeSize) - xs[1]
@@ -186,8 +186,8 @@ func Isogrids(w http.ResponseWriter, key string, colors []color.RGBA, size int)
			xs1[0] = (lines * fringeSize) - xs1[0]
			xs1[1] = (lines * fringeSize) - xs1[1]
			xs1[2] = (lines * fringeSize) - xs1[2]
			canvas.Polygon(xs, ys, fmt.Sprintf("stroke:black;stroke-width:2; %s", fill1))
			canvas.Polygon(xs1, ys1, fmt.Sprintf("stroke:black;stroke-width:2; %s", fill2))
			canvas.Polygon(xs, ys, fill1)
			canvas.Polygon(xs1, ys1, fill2)
		}
	}
	canvas.End()