Commit dd9ce6a6 authored by Jonny Schäfer's avatar Jonny Schäfer
Browse files

Only draw grid if its type was identified

parent 1fa92e18
...@@ -5,11 +5,11 @@ package main ...@@ -5,11 +5,11 @@ package main
import ( import (
"fmt" "fmt"
"gitlab.cs.fau.de/since/radolan"
"image/color" "image/color"
"image/png" "image/png"
"log" "log"
"os" "os"
"gitlab.cs.fau.de/since/radolan"
) )
var ( var (
...@@ -51,20 +51,22 @@ func convert(in, out string) { ...@@ -51,20 +51,22 @@ func convert(in, out string) {
img := comp.Image(heatmap) img := comp.Image(heatmap)
// draw borders // draw borders
for _, b := range border { if comp.HasProjection {
// convert border points to data indices for _, b := range border {
x, y := comp.Translate(b[0], b[1]) // convert border points to data indices
x, y := comp.Translate(b[0], b[1])
// draw point // draw point
img.Set(int(x), int(y), borderColor) img.Set(int(x), int(y), borderColor)
} }
// draw mesh // draw mesh
for e := 1.0; e < 16.0; e += 0.1 { for e := 1.0; e < 16.0; e += 0.1 {
for n := 46.0; n < 55.0; n += 0.1 { for n := 46.0; n < 55.0; n += 0.1 {
if e-float64(int(e)) < 0.1 || n-float64(int(n)) < 0.1 { if e-float64(int(e)) < 0.1 || n-float64(int(n)) < 0.1 {
x, y := comp.Translate(n, e) x, y := comp.Translate(n, e)
img.Set(int(x), int(y), meshColor) img.Set(int(x), int(y), meshColor)
}
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment