private Drawing createDrawing() { DefaultDrawing drawing = new DefaultDrawing(); LinkedList<InputFormat> inputFormats = new LinkedList<InputFormat>(); inputFormats.add(new SVGInputFormat()); inputFormats.add(new SVGZInputFormat()); inputFormats.add(new ImageInputFormat(new SVGImageFigure())); inputFormats.add(new TextInputFormat(new SVGTextFigure())); LinkedList<OutputFormat> outputFormats = new LinkedList<OutputFormat>(); outputFormats.add(new SVGOutputFormat()); outputFormats.add(new ImageOutputFormat()); drawing.setInputFormats(inputFormats); drawing.setOutputFormats(outputFormats); return drawing; }
/** Creates the drawing. */ protected Drawing createDrawing() { DefaultDrawing drawing = new DefaultDrawing(); drawing.addInputFormat(new SVGZInputFormat()); drawing.addInputFormat(new ImageInputFormat(new SVGImageFigure())); drawing.addOutputFormat(new SVGOutputFormat()); drawing.addOutputFormat(new SVGZOutputFormat()); drawing.addOutputFormat(new ImageOutputFormat()); drawing.addOutputFormat( new ImageOutputFormat( "JPG", "Joint Photographics Experts Group (JPEG)", "jpg", BufferedImage.TYPE_INT_RGB)); drawing.addOutputFormat( new ImageOutputFormat( "BMP", "Windows Bitmap (BMP)", "bmp", BufferedImage.TYPE_BYTE_INDEXED)); return drawing; }