Rectangle r = figure.getBounds();
editor.getDefinition().setDimension(new Dimension(r.width, r.height));
image = new Image(Display.getDefault(), r.width, r.height);
gc = new GC(image);
g = new SWTGraphics(gc);
g.translate(r.x * -1, r.y * -1);
figure.paint(g);
ImageLoader imageLoader = new ImageLoader();
imageLoader.data = new ImageData[] { ImageHelper.downSample(image) };
imageLoader.save(getImageSavePath(), SWT.IMAGE_JPEG);
} catch (Exception e) {