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.
Version:
$Id: AbstractSVGFilterPrimitiveElementBridge.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

    • INFINITE_FILTER_REGION

      static final 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 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
    • getFilterSource

      static Filter getFilterSource(Element filterElement, String s, Element filteredElement, GraphicsNode filteredNode, 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(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