float scl_W_DODECA, scl_H_DODECA, scl_W_BOWTIE, scl_H_BOWTIE, scl_W_HEXA, scl_H_HEXA; color c_fill = color(50, 50,150); color c_bg = color(255); color c_stroke = color(0); class TileDraw{ float t, x, y, scl, w, h; FLGlyph f; boolean to_draw = true; TileDraw(FLGlyph f, float x, float y, float t, float scl, boolean to_draw){ this.to_draw = to_draw; this.f = f; this.x = x; this.y = y; this.t = t; this.scl = scl; if(f == flglyphs[0]){//dodeca this.w = scl_W_DODECA; this.h = scl_H_DODECA; } else if(f == flglyphs[1]){//bowtie this.w = scl_W_BOWTIE; this.h = scl_H_BOWTIE; } else if(f == flglyphs[2]){ //hexagon this.w = scl_W_HEXA; this.h = scl_H_HEXA; } } void draw(){ //svg.draw(x, y, w, h); if(to_draw){ if(scl < draw_stroke_min){ fill(c_fill); noStroke(); } else { noFill(); stroke(c_stroke); strokeWeight(scl*6.0); } this.f.draw(x, y, scl, t); } } }