1617181920212223242526
double scale = 0.5f; public ImageViewer() throws HeadlessException { super(); canvas = new PSwingCanvas(); imageNode = new PImage(); imageNode.setScale(scale); canvas.getLayer().addChild(imageNode); add(canvas);