Package org.apache.flex.forks.batik.ext.awt.image.renderable

Examples of org.apache.flex.forks.batik.ext.awt.image.renderable.FilterChainRable8Bit


        sourceGraphic = new PadRable8Bit(sourceGraphic, filterRegion,
                                         PadMode.ZERO_PAD);

        // build a FilterChainRable8Bit
        FilterChainRable filterChain
            = new FilterChainRable8Bit(sourceGraphic, filterRegion);

        // 'filterRes' attribute - default is implementation specific
        float [] filterRes = SVGUtilities.convertFilterRes(filterElement, ctx);
        filterChain.setFilterResolutionX((int)filterRes[0]);
        filterChain.setFilterResolutionY((int)filterRes[1]);

        // Create a map for filter nodes to advertise themselves as
        // named source
        Map filterNodeMap = new HashMap(11);
        filterNodeMap.put(SVG_SOURCE_GRAPHIC_VALUE, sourceGraphic);


        Filter in = buildFilterPrimitives(filterElement,
                                          filterRegion,
                                          filteredElement,
                                          filteredNode,
                                          sourceGraphic,
                                          filterNodeMap,
                                          ctx);
        if ((in == null) || (in == sourceGraphic)) {
            return null; // no filter primitives found, disable the filter.
        } else {
            filterChain.setSource(in);
            return filterChain;
        }
    }
View Full Code Here


        sourceGraphic = new PadRable8Bit(sourceGraphic, filterRegion,
                                         PadMode.ZERO_PAD);

        // build a FilterChainRable8Bit
        FilterChainRable filterChain
            = new FilterChainRable8Bit(sourceGraphic, filterRegion);

        // 'filterRes' attribute - default is implementation specific
        float [] filterRes = SVGUtilities.convertFilterRes(filterElement, ctx);
        filterChain.setFilterResolutionX((int)filterRes[0]);
        filterChain.setFilterResolutionY((int)filterRes[1]);

        // Create a map for filter nodes to advertise themselves as
        // named source
        Map filterNodeMap = new HashMap(11);
        filterNodeMap.put(SVG_SOURCE_GRAPHIC_VALUE, sourceGraphic);


        Filter in = buildFilterPrimitives(filterElement,
                                          filterRegion,
                                          filteredElement,
                                          filteredNode,
                                          sourceGraphic,
                                          filterNodeMap,
                                          ctx);
        if (in == null) {
            // error in one of the primitives, disable the filter
            return null;
        } else if (in == sourceGraphic) {
            // no filter primitive found, so output transparent black
            in = createEmptyFilter(filterElement, filterRegion, filteredElement,
                                   filteredNode, ctx);
        }
        filterChain.setSource(in);
        return filterChain;
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.forks.batik.ext.awt.image.renderable.FilterChainRable8Bit

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.