Class SVGFilterElementBridge

    • Field Detail

      • TRANSPARENT_BLACK

        protected static final java.awt.Color TRANSPARENT_BLACK
        Transparent black color.
    • Constructor Detail

      • SVGFilterElementBridge

        public SVGFilterElementBridge()
        Constructs a new bridge for the <filter> element.
    • Method Detail

      • getLocalName

        public java.lang.String getLocalName()
        Returns 'filter'.
        Specified by:
        getLocalName in interface Bridge
      • createFilter

        public Filter createFilter​(BridgeContext ctx,
                                   org.w3c.dom.Element filterElement,
                                   org.w3c.dom.Element filteredElement,
                                   GraphicsNode filteredNode)
        Creates a Filter according to the specified parameters.
        Specified by:
        createFilter in interface FilterBridge
        Parameters:
        ctx - the bridge context to use
        filterElement - the element that defines the filter
        filteredElement - the element that references the filter element
        filteredNode - the graphics node to filter
      • createEmptyFilter

        protected static Filter createEmptyFilter​(org.w3c.dom.Element filterElement,
                                                  java.awt.geom.Rectangle2D filterRegion,
                                                  org.w3c.dom.Element filteredElement,
                                                  GraphicsNode filteredNode,
                                                  BridgeContext ctx)
        Creates a new returns a new filter that fills its output with transparent black. This is used when a <filter> element has no filter primitive children.
      • buildFilterPrimitives

        protected static Filter buildFilterPrimitives​(org.w3c.dom.Element filterElement,
                                                      java.awt.geom.Rectangle2D filterRegion,
                                                      org.w3c.dom.Element filteredElement,
                                                      GraphicsNode filteredNode,
                                                      Filter in,
                                                      java.util.Map filterNodeMap,
                                                      BridgeContext ctx)
        Builds the filter primitives of filter chain of the specified filter element and returns the last filter primitive created. Filter primitives can be children of the filter or defined on one of its 'ancestor' (linked with the xlink:href attribute).
        Parameters:
        filterElement - the filter element
        filterRegion - the filter chain region
        filteredElement - the filtered element
        filteredNode - the filtered node
        in - the input Filter
        filterNodeMap - the map used by named filter primitives
        ctx - the bridge context
        Returns:
        the last filter primitive created
      • buildLocalFilterPrimitives

        protected static Filter buildLocalFilterPrimitives​(org.w3c.dom.Element filterElement,
                                                           java.awt.geom.Rectangle2D filterRegion,
                                                           org.w3c.dom.Element filteredElement,
                                                           GraphicsNode filteredNode,
                                                           Filter in,
                                                           java.util.Map filterNodeMap,
                                                           BridgeContext ctx)
        Builds the filter primitives of filter chain of the specified filter element and returns the last filter primitive created or 'in' if no filter primitive has been specified.
        Parameters:
        filterElement - the filter element
        filterRegion - the filter chain region
        filteredElement - the filtered element
        filteredNode - the filtered node
        in - the input Filter
        filterNodeMap - the map used by named filter primitives
        ctx - the bridge context
        Returns:
        the last filter primitive created or 'in'