Class AbstractSVGFilterPrimitiveElementBridge

All Implemented Interfaces:
SVGAnimationTargetContext, Bridge, BridgeUpdateHandler, ErrorConstants, FilterPrimitiveBridge, GenericBridge, XMLConstants, SVGContext, CSSConstants, SVGConstants
Direct Known Subclasses:
AbstractSVGLightingElementBridge, BatikHistogramNormalizationElementBridge, SVGFeBlendElementBridge, SVGFeColorMatrixElementBridge, SVGFeComponentTransferElementBridge, SVGFeCompositeElementBridge, SVGFeConvolveMatrixElementBridge, SVGFeDisplacementMapElementBridge, SVGFeFloodElementBridge, SVGFeGaussianBlurElementBridge, SVGFeImageElementBridge, SVGFeMergeElementBridge, SVGFeMorphologyElementBridge, SVGFeOffsetElementBridge, SVGFeTileElementBridge, SVGFeTurbulenceElementBridge

public abstract class AbstractSVGFilterPrimitiveElementBridge extends AnimatableGenericSVGBridge implements FilterPrimitiveBridge, ErrorConstants
The base bridge class for SVG filter primitives.
  • Constructor Details

    • AbstractSVGFilterPrimitiveElementBridge

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

    • getIn

      protected static Filter getIn(Element filterElement, Element filteredElement, GraphicsNode filteredNode, Filter inputFilter, 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(Element filterElement, Element filteredElement, GraphicsNode filteredNode, Filter inputFilter, 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(Element filterElement, Filter filter, 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, Element filterElement)
      Handles the 'color-interpolation-filters' CSS property.
      Parameters:
      filter - the filter
      filterElement - the filter element
    • convertInteger

      protected static int convertInteger(Element filterElement, 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(Element filterElement, 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