def makeWindowedCanvas(): canvas = FullScreenCanvasSWT(1).withKeyboardControlledCamera_smooth() canvas.pressSpaceToSave("/var/tmp/field_") canvas.addDefaultHandlers() global globalCanvas globalCanvas = canvas Launcher.getLauncher().registerUpdateable(canvas) canvas.setVisible(1) canvas.camera.far=10000 return canvas
def makeFullscreenCanvas(clearBackground=1): """Makes a drawing window that fills a display. By default this will go on any second monitor connected to the system (i.e. one without a menu bar on it)""" SystemProperties.setProperty("background.clear","%s"%clearBackground); canvas = FullScreenCanvasSWT().withKeyboardControlledCamera_smooth() canvas.pressSpaceToSave("/var/tmp/field_") canvas.addDefaultHandlers() global globalCanvas globalCanvas = canvas Launcher.getLauncher().registerUpdateable(canvas) canvas.setVisible(1) canvas.camera.far=10000 return canvas