Class AbstractSVGFilterPrimitiveElementBridge

    • Field Detail

      • INFINITE_FILTER_REGION

        static final java.awt.geom.Rectangle2D INFINITE_FILTER_REGION
        This is a bit of a hack but we set the flood bounds to -floatmax/2 -> floatmax/2 (should cover the area ok).
    • Constructor Detail

      • AbstractSVGFilterPrimitiveElementBridge

        protected AbstractSVGFilterPrimitiveElementBridge()
        Constructs a new bridge for a filter primitive element.
    • Method Detail

      • getIn

        protected static Filter getIn​(org.w3c.dom.Element filterElement,
                                      org.w3c.dom.Element filteredElement,
                                      GraphicsNode filteredNode,
                                      Filter inputFilter,
                                      java.util.Map filterMap,
                                      BridgeContext ctx)
        Returns the input source of the specified filter primitive element defined by its 'in' attribute.
        Parameters:
        filterElement - the filter primitive element
        filteredElement - the element on which the filter is referenced
        filteredNode - the graphics node on which the filter is applied
        inputFilter - the default input filter
        filterMap - the map that containes the named filter primitives
        ctx - the bridge context
      • getIn2

        protected static Filter getIn2​(org.w3c.dom.Element filterElement,
                                       org.w3c.dom.Element filteredElement,
                                       GraphicsNode filteredNode,
                                       Filter inputFilter,
                                       java.util.Map filterMap,
                                       BridgeContext ctx)
        Returns the input source of the specified filter primitive element defined by its 'in2' attribute. The 'in2' attribute is assumed to be required if the subclasses ask for it.
        Parameters:
        filterElement - the filter primitive element
        filteredElement - the element on which the filter is referenced
        filteredNode - the graphics node on which the filter is applied
        inputFilter - the default input filter
        filterMap - the map that containes the named filter primitives
        ctx - the bridge context
      • updateFilterMap

        protected static void updateFilterMap​(org.w3c.dom.Element filterElement,
                                              Filter filter,
                                              java.util.Map filterMap)
        Updates the filterMap according to the specified parameters.
        Parameters:
        filterElement - the filter primitive element
        filter - the filter that is part of the filter chain
        filterMap - the filter map to update
      • handleColorInterpolationFilters

        protected static void handleColorInterpolationFilters​(Filter filter,
                                                              org.w3c.dom.Element filterElement)
        Handles the 'color-interpolation-filters' CSS property.
        Parameters:
        filter - the filter
        filterElement - the filter element
      • getFilterSource

        static Filter getFilterSource​(org.w3c.dom.Element filterElement,
                                      java.lang.String s,
                                      org.w3c.dom.Element filteredElement,
                                      GraphicsNode filteredNode,
                                      java.util.Map filterMap,
                                      BridgeContext ctx)
        Returns the filter source according to the specified parameters.
        Parameters:
        filterElement - the filter element
        s - the input of the filter primitive
        filteredElement - the filtered element
        filteredNode - the filtered graphics node
        filterMap - the filter map that contains named filter primitives
        ctx - the bridge context
      • convertInteger

        protected static int convertInteger​(org.w3c.dom.Element filterElement,
                                            java.lang.String attrName,
                                            int defaultValue,
                                            BridgeContext ctx)
        Converts on the specified filter primitive element, the specified attribute that represents an integer and with the specified default value.
        Parameters:
        filterElement - the filter primitive element
        attrName - the name of the attribute
        defaultValue - the default value of the attribute
        ctx - the BridgeContext to use for error information
      • convertNumber

        protected static float convertNumber​(org.w3c.dom.Element filterElement,
                                             java.lang.String attrName,
                                             float defaultValue,
                                             BridgeContext ctx)
        Converts on the specified filter primitive element, the specified attribute that represents a float and with the specified default value.
        Parameters:
        filterElement - the filter primitive element
        attrName - the name of the attribute
        defaultValue - the default value of the attribute
        ctx - the BridgeContext to use for error information