use of org.gephi.preview.api.CanvasSize in project gephi by gephi.
the class SVGRenderTargetBuilder method buildRenderTarget.
@Override
public RenderTarget buildRenderTarget(PreviewModel previewModel) {
CanvasSize cs = previewModel.getGraphicsCanvasSize();
boolean scaleStrokes = previewModel.getProperties().getBooleanValue(SVGTarget.SCALE_STROKES);
SVGRenderTargetImpl renderTarget = new SVGRenderTargetImpl(cs, scaleStrokes);
return renderTarget;
}
use of org.gephi.preview.api.CanvasSize in project gephi by gephi.
the class PDFRenderTargetBuilder method buildRenderTarget.
@Override
public RenderTarget buildRenderTarget(PreviewModel previewModel) {
CanvasSize cs = previewModel.getGraphicsCanvasSize();
PreviewProperties properties = previewModel.getProperties();
float marginBottom = properties.getFloatValue(PDFTarget.MARGIN_BOTTOM);
float marginLeft = properties.getFloatValue(PDFTarget.MARGIN_LEFT);
float marginRight = properties.getFloatValue(PDFTarget.MARGIN_RIGHT);
float marginTop = properties.getFloatValue(PDFTarget.MARGIN_TOP);
com.itextpdf.text.Rectangle pageSize = properties.getValue(PDFTarget.PAGESIZE);
boolean landscape = properties.getBooleanValue(PDFTarget.LANDSCAPE);
PdfContentByte cb = properties.getValue(PDFTarget.PDF_CONTENT_BYTE);
PDFRenderTargetImpl renderTarget = new PDFRenderTargetImpl(cb, cs, pageSize, marginLeft, marginRight, marginTop, marginBottom, landscape);
return renderTarget;
}
Aggregations