Examples of RasterImageNode


Examples of org.apache.batik.gvt.RasterImageNode

    protected static GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                        Element e,
                                                        Rectangle2D bounds,
                                                        ParsedURL     purl) {

        RasterImageNode node = new RasterImageNode();

        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
        Filter           img = reg.readURL(purl);
        Object           obj = img.getProperty
            (SVGBrokenLinkProvider.SVG_BROKEN_LINK_DOCUMENT_PROPERTY);
        if ((obj != null) && (obj instanceof SVGDocument)) {
            // Ok so we are dealing with a broken link.
            return createSVGImageNode(ctx, e, bounds, (SVGDocument)obj);
        }
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
        float [] vb = new float[4];
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

     */
    protected static GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                        Element       e,
                                                        ParsedURL     purl) {

        RasterImageNode node = new RasterImageNode();

        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
        Filter           img = reg.readURL(purl, extractColorSpace(e, ctx));
        Object           obj = img.getProperty
            (SVGBrokenLinkProvider.SVG_BROKEN_LINK_DOCUMENT_PROPERTY);
        if ((obj != null) && (obj instanceof SVGDocument)) {
            // Ok so we are dealing with a broken link.
            SVGOMDocument doc = (SVGOMDocument)obj;
            ctx.initializeDocument(doc);
            return createSVGImageNode(ctx, e, doc);
        }
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();
        Rectangle2D bounds = getImageBounds(ctx, e);

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

     */
    protected static GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                        Element       e,
                                                        ParsedURL     purl) {

        RasterImageNode node = new RasterImageNode();

        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
        Filter           img = reg.readURL(purl, extractColorSpace(e, ctx));
        Object           obj = img.getProperty
            (SVGBrokenLinkProvider.SVG_BROKEN_LINK_DOCUMENT_PROPERTY);
        if ((obj != null) && (obj instanceof SVGDocument)) {
            // Ok so we are dealing with a broken link.
            SVGOMDocument doc = (SVGOMDocument)obj;
            ctx.initializeDocument(doc);
            return createSVGImageNode(ctx, e, doc);
        }
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();
        Rectangle2D bounds = getImageBounds(ctx, e);

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

                (SVGUtilities.convertTransform(e, SVG_TRANSFORM_ATTRIBUTE, s));
        }
        // 'visibility'
        imageNode.setVisible(CSSUtilities.convertVisibility(e));

        RasterImageNode node = new RasterImageNode();

        List dims = new LinkedList();
        List uris = new LinkedList();
        addInfo(e, dims, uris);

        for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) {
            if (n.getNodeType() != Node.ELEMENT_NODE)
                continue;
           
            Element se = (Element)n;
            if (!(se.getNamespaceURI().equals(BATIK_EXT_NAMESPACE_URI)) ||
                !(se.getLocalName().equals(BATIK_EXT_SUB_IMAGE_TAG)))
                continue;

            addInfo(se, dims, uris);
        }

        Dimension [] dary = new Dimension[uris.size()];
        ParsedURL [] uary = new ParsedURL[uris.size()];
        Iterator di = dims.iterator();
        Iterator ui = uris.iterator();
        int n=0;
        while (di.hasNext()) {
            int i;
            Dimension d = (Dimension)di.next();
            for (i=0; i<n; i++) {
                if (d.width > dary[i].width) break;
            }
            for (int j=n; j>i; j--) {
                dary[j] = dary[j-1];
                uary[j] = uary[j-1];
            }
            dary[i] = d;
            uary[i] = (ParsedURL)ui.next();
            n++;
        }

        Filter f = new MultiResRable(uary, dary);

        Rectangle2D imgB, b;
        imgB = f.getBounds2D();
        b = getImageBounds(ctx, e);

        node.setImage(f);
        node.setImageBounds(imgB);

        float []vb = new float[4];
        vb[0] = 0;
        vb[1] = 0;
        vb[2] = (float)imgB.getWidth();
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

     */
    protected static GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                        Element       e,
                                                        ParsedURL     purl) {

        RasterImageNode node = new RasterImageNode();

        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
        Filter           img = reg.readURL(purl, extractColorSpace(e, ctx));
        Object           obj = img.getProperty
            (SVGBrokenLinkProvider.SVG_BROKEN_LINK_DOCUMENT_PROPERTY);
        if ((obj != null) && (obj instanceof SVGDocument)) {
            // Ok so we are dealing with a broken link.
            return createSVGImageNode(ctx, e, (SVGDocument)obj);
        }
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();
        node.setImageBounds(imgBounds);
        Rectangle2D bounds = getImageBounds(ctx, e);

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
        float [] vb = new float[4];
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

     */
    protected static GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                        Element       e,
                                                        ParsedURL     purl) {

        RasterImageNode node = new RasterImageNode();

        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
        Filter           img = reg.readURL(purl, extractColorSpace(e, ctx));
        Object           obj = img.getProperty
            (SVGBrokenLinkProvider.SVG_BROKEN_LINK_DOCUMENT_PROPERTY);
        if ((obj != null) && (obj instanceof SVGDocument)) {
            // Ok so we are dealing with a broken link.
            SVGOMDocument doc = (SVGOMDocument)obj;
            ctx.initializeDocument(doc);
            return createSVGImageNode(ctx, e, doc);
        }
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();
        node.setImageBounds(imgBounds);
        Rectangle2D bounds = getImageBounds(ctx, e);

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
        float [] vb = new float[4];
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

                (SVGUtilities.convertTransform(e, SVG_TRANSFORM_ATTRIBUTE, s));
        }
        // 'visibility'
        imageNode.setVisible(CSSUtilities.convertVisibility(e));

        RasterImageNode node = new RasterImageNode();

        List dims = new LinkedList();
        List uris = new LinkedList();
        addInfo(e, dims, uris);

        for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) {
            if (n.getNodeType() != Node.ELEMENT_NODE)
                continue;
           
            Element se = (Element)n;
            if (!(se.getNamespaceURI().equals(BATIK_EXT_NAMESPACE_URI)) ||
                !(se.getLocalName().equals(BATIK_EXT_SUB_IMAGE_TAG)))
                continue;

            addInfo(se, dims, uris);
        }

        Dimension [] dary = new Dimension[uris.size()];
        ParsedURL [] uary = new ParsedURL[uris.size()];
        Iterator di = dims.iterator();
        Iterator ui = uris.iterator();
        int n=0;
        while (di.hasNext()) {
            int i;
            Dimension d = (Dimension)di.next();
            for (i=0; i<n; i++) {
                if (d.width > dary[i].width) break;
            }
            for (int j=n; j>i; j--) {
                dary[j] = dary[j-1];
                uary[j] = uary[j-1];
            }
            dary[i] = d;
            uary[i] = (ParsedURL)ui.next();
            n++;
        }

        Filter f = new MultiResRable(uary, dary);

        Rectangle2D imgB, b;
        imgB = f.getBounds2D();
        b = getImageBounds(ctx, e);

        node.setImage(f);
        node.setImageBounds(imgB);

        float []vb = new float[4];
        vb[0] = 0;
        vb[1] = 0;
        vb[2] = (float)imgB.getWidth();
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

     */
    protected static GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                        Element       e,
                                                        ParsedURL     purl) {

        RasterImageNode node = new RasterImageNode();

        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
        Filter           img = reg.readURL(purl, extractColorSpace(e, ctx));
        Object           obj = img.getProperty
            (SVGBrokenLinkProvider.SVG_BROKEN_LINK_DOCUMENT_PROPERTY);
        if ((obj != null) && (obj instanceof SVGDocument)) {
            // Ok so we are dealing with a broken link.
            SVGOMDocument doc = (SVGOMDocument)obj;
            ctx.initializeDocument(doc);
            return createSVGImageNode(ctx, e, doc);
        }
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();
        node.setImageBounds(imgBounds);
        Rectangle2D bounds = getImageBounds(ctx, e);

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
        float [] vb = new float[4];
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

            // Ok so we are dealing with a broken link.
            SVGOMDocument doc = (SVGOMDocument)obj;
            return createSVGImageNode(ctx, e, doc);
        }

        RasterImageNode node = new RasterImageNode();
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
        float [] vb = new float[4];
View Full Code Here

Examples of org.apache.batik.gvt.RasterImageNode

     */
    protected static GraphicsNode createRasterImageNode(BridgeContext ctx,
                                                        Element       e,
                                                        ParsedURL     purl) {

        RasterImageNode node = new RasterImageNode();

        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
        Filter           img = reg.readURL(purl, extractColorSpace(e, ctx));
        Object           obj = img.getProperty
            (SVGBrokenLinkProvider.SVG_BROKEN_LINK_DOCUMENT_PROPERTY);
        if ((obj != null) && (obj instanceof SVGDocument)) {
            // Ok so we are dealing with a broken link.
            return createSVGImageNode(ctx, e, (SVGDocument)obj);
        }
        node.setImage(img);
        Rectangle2D imgBounds = img.getBounds2D();
        node.setImageBounds(imgBounds);
        Rectangle2D bounds = getImageBounds(ctx, e);

        // create the implicit viewBox for the raster image. The viewBox for a
        // raster image is the size of the image
        float [] vb = new float[4];
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.