Class SVGConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the inputASVGMarkupStyle parameter.Gets the value of the inputBSVGMarkupStyle parameter.Gets the value of the invalidReferencedSVGBehaviour parameter.doubleGets the value of the svgFallbackChangePercentage parameter.Gets the value of the svgComparisonGranularity parameter.Gets the value of the svgNumericToleranceValue parameter.Gets the value of the zIndexSVGMarkupStyle parameter.booleanGets the value of the compareSVG parameter.booleanGets the value of the svgFallback parameter.booleanGets the value of the svgNumericTolerance parameter.booleanGets the value of the svgZIndex parameter.voidsetCompareSVG(boolean value) Enables or disables SVG Comparison.voidsetInputASVGMarkupStyle(String value) Sets the Input A SVG markup style for SVG comparison results.voidsetInputBSVGMarkupStyle(String value) Sets the Input B SVG markup style for SVG comparison results.voidSets the mode to use for handling invalid referenced SVG.voidsetSvgFallback(boolean value) Sets the SVG fallback setting.voidsetSvgFallbackChangePercentage(double value) Sets fallback change percentage for SVG comparison results.voidsetSvgGranularity(SVGGranularity value) Specifies the granularity at which the differences between two SVG images will be represented.voidsetSvgNumericTolerance(boolean value) Sets whether to use a numeric tolerance.voidSets SVG numeric tolerance value for SVG comparison results.voidsetSvgZIndex(boolean value) Enable Z-Index.voidsetZIndexSVGMarkupStyle(String value) Sets the Z Index SVG markup style for SVG comparison results.
-
Constructor Details
-
SVGConfig
public SVGConfig()Creates a newSVGConfiginstance. These parameters control how SVG changes are displayed.
-
-
Method Details
-
getSvgGranularity
Gets the value of the svgComparisonGranularity parameter.- Returns:
- the value of the svgComparisonGranularity parameter
-
setSvgGranularity
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.ADJACENTif 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 toSVGGranularity.ADJACENT. The default value is 30.00%.- Parameters:
value- a value for fallback change percentage
-
getInputASVGMarkupStyle
Gets the value of the inputASVGMarkupStyle parameter.- Returns:
- the value of the inputASVGMarkupStyle parameter
-
setInputASVGMarkupStyle
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
Gets the value of the inputBSVGMarkupStyle parameter.- Returns:
- the value of the inputBSVGMarkupStyle parameter
-
setInputBSVGMarkupStyle
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
Gets the value of the invalidReferencedSVGBehaviour parameter.- Returns:
- the value of the invalidReferencedSVGBehaviour parameter
-
setInvalidReferencedSVGBehaviour
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
Gets the value of the svgNumericToleranceValue parameter.- Returns:
- the value of the svgNumericToleranceValue parameter
-
setSvgNumericToleranceValue
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
Gets the value of the zIndexSVGMarkupStyle parameter.- Returns:
- the value of the zIndexSVGMarkupStyle parameter
-
setZIndexSVGMarkupStyle
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
-