Package org.apache.fop.image

Examples of org.apache.fop.image.FopImage


        int w = area.getContentWidth();
        int h = area.getHeight();

        this.currentYPosition -= h;

        FopImage img = area.getImage();
        if (img instanceof SVGImage) {
            /*
             * try {
             * SVGSVGElement svg =
             * ((SVGImage) img).getSVGDocument().getRootElement();
             * currentStream.add("ET\nq\n" + (((float) w) / 1000f) +
             * " 0 0 " + (((float) h) / 1000f) + " " +
             * (((float) x) / 1000f) + " " +
             * (((float)(y - h)) / 1000f) + " cm\n");
             * //        renderSVG(svg, (int) x, (int) y);
             * currentStream.add("Q\nBT\n");
             * } catch (FopImageException e) {
             * }
             */

            log.warn("SVG images not supported in this version");
        } else {
            String url = img.getURL();
            this.mifDoc.addImage(url, x, pageHeight - y, w, h);

        }
    }
View Full Code Here


        int w = area.getContentWidth();
        int h = area.getHeight();

        this.currentYPosition -= h;

        FopImage img = area.getImage();
        if (img instanceof SVGImage) {
            try {
                closeText();

                SVGSVGElement svg =
View Full Code Here

        int h = area.getHeight();

        //this.currentYPosition -= h;
        this.currentXPosition += w;

        FopImage img = area.getImage();

        if (img == null) {
            log.error("Error while loading image: area.getImage() is null");
        } else {
            drawImageScaled(x, y, w, h, img, area.getFontState());
View Full Code Here

        int w = area.getContentWidth();
        int h = area.getHeight();

        this.currentYPosition -= h;

        FopImage img = area.getImage();

        try {
            printBMP(img, x, y, w, h);
        } catch (FopImageException e) {
            // e.printStackTrace(System.out);
View Full Code Here

    public void renderImage(FontState fontState, String href, float x,
                            float y, float width, float height) {
        try {
            if (href.indexOf(":") == -1)
                href = "file:" + href;
            FopImage img = FopImageFactory.Make(href);
            if (img != null) {
                if (img instanceof SVGImage) {
                    SVGSVGElement svg =
                        ((SVGImage)img).getSVGDocument().getRootElement();
                    renderSVG(fontState, svg, (int)x * 1000, (int)y * 1000);
 
View Full Code Here

        int w = area.getContentWidth();
        int h = area.getHeight();

        this.currentYPosition -= h;

        FopImage img = area.getImage();

        if (img == null) {
            log.error("Error while loading image: area.getImage() is null");
        } else {
            drawImageScaled(x, y, w, h, img, area.getFontState());
View Full Code Here

        int w = area.getContentWidth();
        int h = area.getHeight();

        this.currentYPosition -= h;

        FopImage img = area.getImage();
        if (img instanceof SVGImage) {
            try {
                closeText();

                SVGSVGElement svg =
View Full Code Here

                            float height) {
        try {
            if (href.indexOf(":") == -1) {
                href = "file:" + href;
            }
            FopImage img = FopImageFactory.Make(href);
            PDFNumber pdfNumber = new PDFNumber();
            if (img instanceof SVGImage) {
                SVGSVGElement svg =
                  ((SVGImage) img).getSVGDocument().getRootElement();
                currentStream.write("q\n" + pdfNumber.doubleOut(width /
View Full Code Here

            if (href.indexOf(":") == -1) {
                href = "file:" + href;
            }
            try {
                // this is really only to get a cached svg image
                FopImage img = FopImageFactory.Make(href);
                if (img instanceof SVGImage) {
                    SVGDocument doc = ((SVGImage) img).getSVGDocument();
                    Element ele = doc.getElementById(
                                    ref.substring(pos + 1, ref.length()));
                    if (ele instanceof SVGElement) {
View Full Code Here

    int w = area.getContentWidth();
    int h = area.getHeight();

    this.currentYPosition -= h;

    FopImage img = area.getImage();

    int xpos = xoffset + (x / 100);
    if ( xpos < 0 )
    {
      xpos = 0;
View Full Code Here

TOP

Related Classes of org.apache.fop.image.FopImage

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.