Package org.apache.batik.gvt

Examples of org.apache.batik.gvt.GraphicsNode.paint()


        // double sx = bounds.getWidth()/sizes[idx].getWidth();
        // double sy = bounds.getHeight()/sizes[idx].getHeight();
        // System.err.println("Scale: [" + sx + ", " + sy + "]");

        gn.paint(g2d);
    }

    // This function can be tweaked to any extent.  This is a very
    // simple measure of 'goodness'.  It has two main flaws as is,
    // mostly in regards to distance calc with 'unbounded' ranges.
View Full Code Here


        // get the 'width' and 'height' attributes of the SVG document
        width = (int) (ctx.getDocumentSize().getWidth() + 0.5);
        height = (int) (ctx.getDocumentSize().getHeight() + 0.5);

        SpriteGraphics2D swf2d = new SpriteGraphics2D(width, height);
    gvtRoot.paint(swf2d);
    tags = swf2d.getTags();

    //Override width and height based on the SWF-specific bounds of the sprite contents
    //However we have to correct co-ordinates back to pixels... TODO: Remove all TWIPS references!
    Rect bounds = swf2d.getBounds();
View Full Code Here

        GraphicsNode gn = pp.getGraphicsNode();
        //Rectangle2D gnBBox = gn.getBounds();
        Rectangle2D rect = pp.getPatternRect();

        // if (!pp.getOverflow()) {
            gn.paint(pattGraphic);
        // } else {
        // /* Commented out until SVN version of Batik is included */
        //     // For overflow we need to paint the content from
        //     // all the tiles who's overflow will intersect one
        //     // tile (left->right, top->bottom).  Then we can
View Full Code Here

        pdfInfo.pdfState.setTransform(transform);
        graphics.setPDFState(pdfInfo.pdfState);
        graphics.setOutputStream(pdfInfo.outputStream);
        try {
            root.paint(graphics);
            pdfInfo.currentStream.add(graphics.getString());
        } catch (Exception e) {
            log.error("svg graphic could not be rendered: "
                                   + e.getMessage(), e);
        }
View Full Code Here

            AffineTransform transform = new AffineTransform();
            // scale to viewbox
            transform.translate(xOffset, yOffset);
            gen.getCurrentState().concatMatrix(transform);
            try {
                root.paint(graphics);
            } catch (Exception e) {
                log.error("SVG graphic could not be rendered: "
                                       + e.getMessage(), e);
            }
View Full Code Here

            GraphicsNode node = children[i];
            if (node == null || !node.isVisible()) {
                continue;
            }
            try {
               node.paint(g2d, rc);
            } catch (InterruptedException ie) {
            }
        }
    }
View Full Code Here

            pdfInfo.pdfState.setTransform(transform);
            graphics.setPDFState(pdfInfo.pdfState);
            graphics.setOutputStream(pdfInfo.outputStream);
            try {
                root.paint(graphics);
                pdfInfo.currentStream.add(graphics.getString());
            } catch (Exception e) {
                log.error("svg graphic could not be rendered: "
                                       + e.getMessage(), e);
            }
View Full Code Here

            if (!at.isIdentity()) {
                info.state.getGraph().transform(at);
            }

            try {
                root.paint(info.state.getGraph());
            } catch (Exception e) {
                log.error("Error while painting SVG", e);
            }
           
            info.state.getGraph().setTransform(origTransform);
View Full Code Here

        GraphicsNode gn = pp.getGraphicsNode();
        Rectangle2D gnBBox = gn.getBounds();
        Rectangle2D rect = pp.getPatternRect();

        // if (!pp.getOverflow()) {
            gn.paint(pattGraphic);
        // } else {
        // /* Commented out until SVN version of Batik is included */
        //     // For overflow we need to paint the content from
        //     // all the tiles who's overflow will intersect one
        //     // tile (left->right, top->bottom).  Then we can
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.