Loading controllers/isogrids/banner.go +4 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,10 @@ func BannerRandomGradient(w http.ResponseWriter, r *http.Request) { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } xt := extract.XTriangles(r) write.ImageSVG(w) isogrids.RandomGradient(w, "", colors, width, height, xt) Loading controllers/isogrids/gradient.go +10 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,16 @@ func BannerGradient(w http.ResponseWriter, r *http.Request) { colors = append(colors, bg, fg) gColors = []color.RGBA{bg, fg} } if newColors, err := extract.Colors(r); err == nil { colors = newColors if len(colors) > 2 { gColors = colors[1:3] } else { gColors = colors } } prob := extract.Probability(r, 1/float64(len(colors))) write.ImageSVG(w) Loading controllers/isogrids/hexa.go +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ func Hexa(w http.ResponseWriter, r *http.Request) { } else { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } write.ImageSVG(w) isogrids.Hexa(w, key, colors, size, lines) } controllers/isogrids/isogrids.go +4 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ func Isogrids(w http.ResponseWriter, r *http.Request) { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } size := extract.Size(r) lines := extract.Lines(r) Loading controllers/isogrids/random.go +5 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ func Random(w http.ResponseWriter, r *http.Request) { } else { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } prob := extract.Probability(r, 1/float64(len(colors))) size := extract.Size(r) Loading Loading
controllers/isogrids/banner.go +4 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,10 @@ func BannerRandomGradient(w http.ResponseWriter, r *http.Request) { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } xt := extract.XTriangles(r) write.ImageSVG(w) isogrids.RandomGradient(w, "", colors, width, height, xt) Loading
controllers/isogrids/gradient.go +10 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,16 @@ func BannerGradient(w http.ResponseWriter, r *http.Request) { colors = append(colors, bg, fg) gColors = []color.RGBA{bg, fg} } if newColors, err := extract.Colors(r); err == nil { colors = newColors if len(colors) > 2 { gColors = colors[1:3] } else { gColors = colors } } prob := extract.Probability(r, 1/float64(len(colors))) write.ImageSVG(w) Loading
controllers/isogrids/hexa.go +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ func Hexa(w http.ResponseWriter, r *http.Request) { } else { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } write.ImageSVG(w) isogrids.Hexa(w, key, colors, size, lines) }
controllers/isogrids/isogrids.go +4 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ func Isogrids(w http.ResponseWriter, r *http.Request) { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } size := extract.Size(r) lines := extract.Lines(r) Loading
controllers/isogrids/random.go +5 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ func Random(w http.ResponseWriter, r *http.Request) { } else { colors = append(colors, bg, fg) } if newColors, err := extract.Colors(r); err == nil { colors = newColors } prob := extract.Probability(r, 1/float64(len(colors))) size := extract.Size(r) Loading