341342343344345346347348349350351
public void draw() { PGraphics pg = getInnerPG(); pg.beginDraw(); // Clears canvas (set to transparency, to not smudge previous map on panning) pg.clear(); if (bgColor != null) { // Set background color if given (can also be transparent) pg.background(bgColor); }