Package org.apache.fop.render

Examples of org.apache.fop.render.RendererContext


     * @param doc DOM document representing the XML document
     * @param ns Namespace for the document
     * @param pos Position on the page
     */
    public void renderDocument(Document doc, String ns, Rectangle2D pos) {
        RendererContext context;
        context = new RendererContext(this, getMimeType());
        context.setUserAgent(userAgent);

        context.setProperty(Java2DRendererContextConstants.JAVA2D_STATE, state);
        context.setProperty(Java2DRendererContextConstants.XPOS,
                            new Integer(currentIPPosition + (int)pos.getX()));
        context.setProperty(Java2DRendererContextConstants.YPOS,
                            new Integer(currentBPPosition + (int)pos.getY()));
        context.setProperty(Java2DRendererContextConstants.WIDTH,
                            new Integer((int)pos.getWidth()));
        context.setProperty(Java2DRendererContextConstants.HEIGHT,
                            new Integer((int) pos.getHeight()));
       
        renderXML(context, doc, ns);
    }
View Full Code Here


     * @param doc DOM document representing the XML document
     * @param ns Namespace for the document
     * @param pos Position on the page
     */
    public void renderDocument(Document doc, String ns, Rectangle2D pos) {
        RendererContext context;
        context = new RendererContext(this, MIME_TYPE);
        context.setUserAgent(userAgent);

        context.setProperty(PDFRendererContextConstants.PDF_DOCUMENT, pdfDoc);
        context.setProperty(PDFRendererContextConstants.OUTPUT_STREAM, ostream);
        context.setProperty(PDFRendererContextConstants.PDF_STATE, currentState);
        context.setProperty(PDFRendererContextConstants.PDF_PAGE, currentPage);
        context.setProperty(PDFRendererContextConstants.PDF_CONTEXT,
                    currentContext == null ? currentPage : currentContext);
        context.setProperty(PDFRendererContextConstants.PDF_CONTEXT, currentContext);
        context.setProperty(PDFRendererContextConstants.PDF_STREAM, currentStream);
        context.setProperty(PDFRendererContextConstants.XPOS,
                            new Integer(currentIPPosition + (int) pos.getX()));
        context.setProperty(PDFRendererContextConstants.YPOS,
                            new Integer(currentBPPosition + (int) pos.getY()));
        context.setProperty(PDFRendererContextConstants.PDF_FONT_INFO, fontInfo);
        context.setProperty(PDFRendererContextConstants.PDF_FONT_NAME, currentFontName);
        context.setProperty(PDFRendererContextConstants.PDF_FONT_SIZE,
                            new Integer(currentFontSize));
        context.setProperty(PDFRendererContextConstants.WIDTH,
                            new Integer((int) pos.getWidth()));
        context.setProperty(PDFRendererContextConstants.HEIGHT,
                            new Integer((int) pos.getHeight()));
        renderXML(context, doc, ns);

    }
View Full Code Here

   
    /**
     * Creates a new XML renderer.
     */
    public XMLRenderer() {
        context = new RendererContext(this, XML_MIME_TYPE);
    }
View Full Code Here

     * @param doc DOM document representing the XML document
     * @param ns Namespace for the document
     * @param pos Position on the page
     */
    public void renderDocument(Document doc, String ns, Rectangle2D pos) {
        RendererContext context;
        context = new RendererContext(this, getMimeType());
        context.setUserAgent(userAgent);

        context.setProperty(Java2DSVGHandler.JAVA2D_STATE, state);
        context.setProperty(Java2DSVGHandler.JAVA2D_XPOS,
                            new Integer(currentIPPosition + (int)pos.getX()));
        context.setProperty(Java2DSVGHandler.JAVA2D_YPOS,
                            new Integer(currentBPPosition + (int)pos.getY()));
        context.setProperty(Java2DSVGHandler.JAVA2D_WIDTH,
                            new Integer((int)pos.getWidth()));
        context.setProperty(Java2DSVGHandler.JAVA2D_HEIGHT,
                            new Integer((int) pos.getHeight()));
       
        renderXML(context, doc, ns);
    }
View Full Code Here

     * @param doc DOM document representing the XML document
     * @param ns Namespace for the document
     * @param pos Position on the page
     */
    public void renderDocument(Document doc, String ns, Rectangle2D pos) {
        RendererContext context;
        context = new RendererContext(this, MIME_TYPE);
        context.setUserAgent(userAgent);

        context.setProperty(PDFSVGHandler.PDF_DOCUMENT, pdfDoc);
        context.setProperty(PDFSVGHandler.OUTPUT_STREAM, ostream);
        context.setProperty(PDFSVGHandler.PDF_STATE, currentState);
        context.setProperty(PDFSVGHandler.PDF_PAGE, currentPage);
        context.setProperty(PDFSVGHandler.PDF_CONTEXT,
                    currentContext == null ? currentPage : currentContext);
        context.setProperty(PDFSVGHandler.PDF_CONTEXT, currentContext);
        context.setProperty(PDFSVGHandler.PDF_STREAM, currentStream);
        context.setProperty(PDFSVGHandler.PDF_XPOS,
                            new Integer(currentIPPosition + (int) pos.getX()));
        context.setProperty(PDFSVGHandler.PDF_YPOS,
                            new Integer(currentBPPosition + (int) pos.getY()));
        context.setProperty(PDFSVGHandler.PDF_FONT_INFO, fontInfo);
        context.setProperty(PDFSVGHandler.PDF_FONT_NAME, currentFontName);
        context.setProperty(PDFSVGHandler.PDF_FONT_SIZE,
                            new Integer(currentFontSize));
        context.setProperty(PDFSVGHandler.PDF_WIDTH,
                            new Integer((int) pos.getWidth()));
        context.setProperty(PDFSVGHandler.PDF_HEIGHT,
                            new Integer((int) pos.getHeight()));
        renderXML(context, doc, ns);

    }
View Full Code Here

     * @param ns Namespace for the XML document
     * @param pos Position for the generated graphic/image
     */
    public void renderDocument(Document doc, String ns, Rectangle2D pos) {
        endTextObject();
        RendererContext context;
        context = new RendererContext(this, MIME_TYPE);
        context.setUserAgent(userAgent);

        context.setProperty(PSSVGHandler.PS_GENERATOR, this.gen);
        context.setProperty(PSSVGHandler.PS_FONT_INFO, fontInfo);
        context.setProperty(PSSVGHandler.PS_WIDTH,
                            new Integer((int) pos.getWidth()));
        context.setProperty(PSSVGHandler.PS_HEIGHT,
                            new Integer((int) pos.getHeight()));
        context.setProperty(PSSVGHandler.PS_XPOS,
                            new Integer(currentIPPosition + (int) pos.getX()));
        context.setProperty(PSSVGHandler.PS_YPOS,
                            new Integer(currentBPPosition + (int) pos.getY()));
        //context.setProperty("strokeSVGText", options.get("strokeSVGText"));
       
        renderXML(context, doc, ns);
    }
View Full Code Here

    /**
     * Creates a new SVG renderer.
     */
    public SVGRenderer() {
        context = new RendererContext(this, SVG_MIME_TYPE);
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.render.RendererContext

Copyright © 2018 www.massapicom. 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.