Package org.apache.batik.gvt

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


        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


            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

        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

        // 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

        GraphicsNode gn = getGraphicsNode();
        if (getUsePrimitivePaint()){
            gn.primitivePaint(g2d);
        }
        else{
            gn.paint(g2d);
        }

        // Paint did the work...
        return true;
    }
View Full Code Here

            return null;
        }
        graphics.setGraphicContext(
                new org.apache.batik.ext.awt.g2d.GraphicContext());

        root.paint(graphics);
        return graphics;
    }

}
View Full Code Here

        }
        if (! at.isIdentity()) {
            graphics.transform(at);
        }

        root.paint(graphics);

        if (inverse != null && !inverse.isIdentity()) {
            graphics.transform(inverse);
        }
        graphics.translate(-x, -y);
View Full Code Here

        ctx = null;
        builder = null;

        final PSGraphics2D graphics = new PSGraphics2D(false, cos, this.getLogger());
        graphics.setGraphicContext(new GraphicContext());
        root.paint(graphics);
    }

    /**
     * Creates a BridgeContext instance for use by Batik when rendering an SVG
     * graphic.
 
View Full Code Here

                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

        if (getUsePrimitivePaint()){
            gn.primitivePaint(g2d, gnrc);
        }
        else{
            gn.paint(g2d, gnrc);
        }

        // Paint did the work...
        return true;
    }
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.