// loadShape.pde adapted from https://processing.org/reference/loadShape_.html // D. Parson, 2/14/2018 PShape s; void setup() { size(500, 500); // The file "loadShape.svg" must be in the sketch or data folder // of the current sketch to load successfully s = loadShape("loadShape.svg"); } void draw() { background(0, 255, 255); shapeMode(CENTER); float swidth = s.width ; float sheight = s.height ; float aspectRatio = swidth / sheight ; float displayWidth = width / 2 ; float displayHeight = displayWidth / aspectRatio ; shape(s, width/2, height/2, displayWidth, displayHeight); }