Package org.apache.batik.svggen

Examples of org.apache.batik.svggen.SVGGraphics2D.dispose()


          out.close();

      }catch(Exception e){
        throw e;
      }finally{
        svgGenerator.dispose();
        svgGenerator = null;
      }
       
    }
   
View Full Code Here


        //Populate the document root with the generated SVG content.
        g2d.getRoot(root);

        //Return the generated SVG image
        ImageXMLDOM svgImage = new ImageXMLDOM(src.getInfo(), document, BatikImageFlavors.SVG_DOM);
        g2d.dispose();
        return svgImage;
    }

    /** {@inheritDoc} */
    public ImageFlavor getSourceFlavor() {
View Full Code Here

                    layer.render(clippedGraphics2D, clientHttpRequestFactory, transformer, isFirstLayer);

                    path = new File(printDirectory, mapKey + "_layer_" + i + ".svg");
                    saveSvgFile(graphics2D, path);
                } finally {
                    graphics2D.dispose();
                }
            } else {
                // render layer as raster graphic
                final BufferedImage bufferedImage = new BufferedImage(transformer.getMapSize().width,
                        transformer.getMapSize().height, this.imageType.value);
View Full Code Here

                    layer.render(graphics2D, clientHttpRequestFactory, transformer, isFirstLayer);

                    path = new File(printDirectory, mapKey + "_layer_" + i + ".png");
                    ImageIO.write(bufferedImage, "png", path);
                } finally {
                    graphics2D.dispose();
                }
            }
            graphics.add(path.toURI());
            i++;
        }
View Full Code Here

                tryLayout(graphics2D, scaleUnit, scale, niceIntervalLengthInWorldUnits, settings, 0);

                path = File.createTempFile("scalebar-graphic-", ".svg", tempFolder);
                CreateMapProcessor.saveSvgFile(graphics2D, path);
            } finally {
                graphics2D.dispose();
            }
        } else {
            // render scalebar as raster graphic
            final BufferedImage bufferedImage = new BufferedImage(maxWidthInPixelAdjusted, maxHeightInPixelAdjusted,
                    BufferedImage.TYPE_4BYTE_ABGR);
View Full Code Here

                tryLayout(graphics2D, scaleUnit, scale, niceIntervalLengthInWorldUnits, settings, 0);

                path = File.createTempFile("scalebar-graphic-", ".tiff", tempFolder);
                ImageIO.write(bufferedImage, "tiff", path);
            } finally {
                graphics2D.dispose();
            }
        }

        return path.toURI();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.