Class SVGConfig

java.lang.Object
com.deltaxml.dita.config.SVGConfig

public class SVGConfig extends Object
These parameters control how SVG changes are displayed.
  • Constructor Details

    • SVGConfig

      public SVGConfig()
      Creates a new SVGConfig instance. These parameters control how SVG changes are displayed.
  • Method Details

    • getSvgGranularity

      public SVGGranularity getSvgGranularity()
      Gets the value of the svgComparisonGranularity parameter.
      Returns:
      the value of the svgComparisonGranularity parameter
    • setSvgGranularity

      public void setSvgGranularity(SVGGranularity value)

      Specifies the granularity at which the differences between two SVG images will be represented.

      SVG Granularity can be of three types - 'detailed-adjacent', 'adjacent', 'animate-inline'.

      Default: detailed-adjacent

      Parameters:
      value - value for type of SvgGranularity
      Throws:
      IllegalArgumentException - if the value is null
      See Also:
    • isCompareSVG

      public boolean isCompareSVG()
      Gets the value of the compareSVG parameter.
      Returns:
      the value of the compareSVG parameter
    • setCompareSVG

      public void setCompareSVG(boolean value)

      Enables or disables SVG Comparison.

      SVG comparison is recommended as it will use SVG XML-aware features when comparing two SVG images to ensure that the result can be rendered.

      Parameters:
      value - whether to use SVG comparison
    • isSvgFallback

      public boolean isSvgFallback()
      Gets the value of the svgFallback parameter.
      Returns:
      the value of the svgFallback parameter
    • setSvgFallback

      public void setSvgFallback(boolean value)

      Sets the SVG fallback setting. If enabled the SVG comparison granularity will fallback to SVGGranularity.ADJACENT if SVG change exceeds the svgFallbackChangePercentage.

      Parameters:
      value - whether to use SVG Granularity fallback
    • getSvgFallbackChangePercentage

      public double getSvgFallbackChangePercentage()
      Gets the value of the svgFallbackChangePercentage parameter.
      Returns:
      the value of the svgFallbackChangePercentage parameter
    • setSvgFallbackChangePercentage

      public void setSvgFallbackChangePercentage(double value)
      Sets fallback change percentage for SVG comparison results. If this value is exceeded the SVG granularity will fall back to SVGGranularity.ADJACENT. The default value is 30.00%.
      Parameters:
      value - a value for fallback change percentage
    • getInputASVGMarkupStyle

      public String getInputASVGMarkupStyle()
      Gets the value of the inputASVGMarkupStyle parameter.
      Returns:
      the value of the inputASVGMarkupStyle parameter
    • setInputASVGMarkupStyle

      public void setInputASVGMarkupStyle(String value)
      Sets the Input A SVG markup style for SVG comparison results. The default is "red" and DITA Compare expects the style in the same format.
      Parameters:
      value - the Input A SVG markup style
      Throws:
      IllegalArgumentException - if the value is null
    • getInputBSVGMarkupStyle

      public String getInputBSVGMarkupStyle()
      Gets the value of the inputBSVGMarkupStyle parameter.
      Returns:
      the value of the inputBSVGMarkupStyle parameter
    • setInputBSVGMarkupStyle

      public void setInputBSVGMarkupStyle(String value)
      Sets the Input B SVG markup style for SVG comparison results. The default is "green" and DITA Compare expects the style in the same format.
      Parameters:
      value - the Input B SVG markup style
      Throws:
      IllegalArgumentException - if the value is null
    • getInvalidReferencedSVGBehaviour

      public InvalidReferencedSVGBehaviour getInvalidReferencedSVGBehaviour()
      Gets the value of the invalidReferencedSVGBehaviour parameter.
      Returns:
      the value of the invalidReferencedSVGBehaviour parameter
    • setInvalidReferencedSVGBehaviour

      public void setInvalidReferencedSVGBehaviour(InvalidReferencedSVGBehaviour value)

      Sets the mode to use for handling invalid referenced SVG.

      Default: InvalidReferencedSVGBehaviour.FAIL

      Parameters:
      value - the value to set for the invalidReferencedSVGBehaviour parameter
      Throws:
      IllegalArgumentException - if the value is null
      See Also:
    • isSvgNumericTolerance

      public boolean isSvgNumericTolerance()
      Gets the value of the svgNumericTolerance parameter.
      Returns:
      the value of the svgNumericTolerance parameter
    • setSvgNumericTolerance

      public void setSvgNumericTolerance(boolean value)

      Sets whether to use a numeric tolerance. SVG comparison will check co-ordinate values are within specified tolerance and therefore can be considered having negligible change.

      Parameters:
      value - whether to use in SVG comparison
    • getSvgNumericToleranceValue

      public String getSvgNumericToleranceValue()
      Gets the value of the svgNumericToleranceValue parameter.
      Returns:
      the value of the svgNumericToleranceValue parameter
    • setSvgNumericToleranceValue

      public void setSvgNumericToleranceValue(String value)
      Sets SVG numeric tolerance value for SVG comparison results. Values within the specified tolerance will be considered equal. The default value is 1%.
      Parameters:
      value - a value for numeric tolerance
      Throws:
      IllegalArgumentException - if the value is null
    • isSvgZIndex

      public boolean isSvgZIndex()
      Gets the value of the svgZIndex parameter.
      Returns:
      the value of the svgZIndex parameter
    • setSvgZIndex

      public void setSvgZIndex(boolean value)

      Enable Z-Index. SVG comparison will account for Z-Index changes and mark them up differently to standard change.

      Parameters:
      value - whether to use the Z-Index feature in SVG comparison
    • getZIndexSVGMarkupStyle

      public String getZIndexSVGMarkupStyle()
      Gets the value of the zIndexSVGMarkupStyle parameter.
      Returns:
      the value of the zIndexSVGMarkupStyle parameter
    • setZIndexSVGMarkupStyle

      public void setZIndexSVGMarkupStyle(String value)
      Sets the Z Index SVG markup style for SVG comparison results. The default is "purple" and DITA Compare expects the style in the same format.
      Parameters:
      value - the Input B SVG markup style
      Throws:
      IllegalArgumentException - if the value is null