}
}
@Override
public void export(File file, SketchDocument doc) {
Bounds bounds = null;
if(includeDocumentBounds) {
bounds = new Bounds(0,0,doc.getWidth(),doc.getHeight());
} else {
bounds = calculateBounds(doc.getCurrentPage().getModel());
}
BufferedImage img = new BufferedImage((int)bounds.getWidth()+1,(int)bounds.getHeight()+1,BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = img.createGraphics();
g2.translate(-bounds.getX(),-bounds.getY());
PNGExporter exporter = new PNGExporter();
exporter.setIncludeDocumentBackground(includeBackground);
ExportProcessor.process(exporter, g2, doc);
if(includeStamp) {
g2.translate(bounds.getX(),bounds.getY());
g2.setPaint(Color.BLACK);
Font font = org.joshy.gfx.draw.Font.DEFAULT.getAWTFont();
g2.setFont(font);
String stamp = "handcrafted with LeonardoSketch.org";
Rectangle2D sb = font.getStringBounds(stamp, g2.getFontRenderContext());