public class SVGConfiguration
extends java.lang.Object
Specifies configuration options for SVG comparison. These configuration options can be specified on a
DocumentComparator
to configure its behaviour when comparing SVG.
Constructor and Description |
---|
SVGConfiguration()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
enableNumericTolerance(boolean value)
Sets whether to use a numeric tolerance.
|
double |
getFallbackChangePercentage()
Sets the fallback change percentage setting for SVG comparison results.
|
java.lang.String |
getInputASVGMarkupStyle()
Returns the Input A SVG markup style setting for SVG comparison results.
|
java.lang.String |
getInputBSVGMarkupStyle()
Returns the Input B SVG markup style setting for SVG comparison results.
|
java.lang.String |
getNumericToleranceValue()
Sets the numeric tolerance value for SVG comparison results.
|
SVGGranularity |
getSVGComparisonGranularity()
Returns the granularity setting for SVG comparison results.
|
java.lang.String |
getXpathToReferencedSVG()
Returns the XPath to the referenced SVG.
|
java.lang.String |
getZIndexSVGMarkupStyle()
Returns the Input Z SVG markup style setting for SVG comparison results.
|
boolean |
isEnabled()
Determines whether SVG comparison is enabled.
|
boolean |
isFallbackEnabled()
Determines whether to fallback to
SVGGranularity.ADJACENT . |
boolean |
isNumericToleranceEnabled()
Determines whether to use numeric tolerance.
|
boolean |
isZIndexEnabled()
Determines whether to recognise moves and show Z-index changes in SVG Comparisons.
|
void |
setEnabled(boolean value)
Sets whether the
DocumentComparator should do SVG comparison. |
void |
setFallback(boolean value)
Sets whether to fallback to
SVGGranularity.DETAILED . |
void |
setFallbackChangePercentage(double fallbackChangePercentage)
Sets fallback change percentage setting for SVG comparison results.
|
void |
setInputASVGMarkupStyle(java.lang.String inputASVGMarkupStyle)
Sets the Input A SVG markup style setting for SVG comparison results.
|
void |
setInputBSVGMarkupStyle(java.lang.String inputBSVGMarkupStyle)
Sets the Input B SVG markup style setting for SVG comparison results.
|
void |
setNumericToleranceValue(java.lang.String numericToleranceValue)
Sets the numeric tolerance value for SVG comparison results.
|
void |
setSVGComparisonGranularity(SVGGranularity svgComparisonGranularity)
Sets the granularity at which the differences between two SVG images will be represented.
|
void |
setXpathToReferencedSVG(java.lang.String xPathToReferencedSVG)
Sets XPath to the referenced SVG.
|
void |
setZIndex(boolean value)
Sets whether the
DocumentComparator should show Z-Index changes in a SVG comparison. |
void |
setZIndexSVGMarkupStyle(java.lang.String zIndexSVGMarkupStyle)
Sets the Z Index SVG markup style setting for SVG comparison results.
|
public void setEnabled(boolean value)
Sets whether the DocumentComparator
should do 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.
value
- whether to use SVG comparisonpublic boolean isEnabled()
Determines whether SVG comparison is enabled.
public void setSVGComparisonGranularity(SVGGranularity svgComparisonGranularity)
svgComparisonGranularity
- an instance of SVGGranularity
public SVGGranularity getSVGComparisonGranularity()
SVGGranularity
public void setZIndex(boolean value)
Sets whether the DocumentComparator
should show Z-Index changes in a SVG comparison.
Z-Index changes in SVG comparisons are recommended as it will recognise Z-index changes and render the changes with an alternate colour.
value
- whether to use SVG comparisonpublic boolean isZIndexEnabled()
Determines whether to recognise moves and show Z-index changes in SVG Comparisons.
public void setFallback(boolean value)
Sets whether to fallback to SVGGranularity.DETAILED
. SVG comparison granularity will fallback to
SVGGranularity.ADJACENT
if SVG exceeds the number changed elements defined by FallbackChangePercentage.
value
- whether to use SVG comparisonpublic boolean isFallbackEnabled()
Determines whether to fallback to SVGGranularity.ADJACENT
.
public void setFallbackChangePercentage(double fallbackChangePercentage)
fallbackChangePercentage
- a value for fallback change percentagepublic double getFallbackChangePercentage()
SVGGranularity
public void setInputASVGMarkupStyle(java.lang.String inputASVGMarkupStyle)
inputASVGMarkupStyle
- the Input A SVG markup stylepublic java.lang.String getInputASVGMarkupStyle()
public void setInputBSVGMarkupStyle(java.lang.String inputBSVGMarkupStyle)
inputBSVGMarkupStyle
- the Input B SVG markup stylepublic java.lang.String getInputBSVGMarkupStyle()
public void setZIndexSVGMarkupStyle(java.lang.String zIndexSVGMarkupStyle)
zIndexSVGMarkupStyle
- the Input Z SVG markup stylepublic java.lang.String getZIndexSVGMarkupStyle()
public void setNumericToleranceValue(java.lang.String numericToleranceValue)
numericToleranceValue
- a value for SVG numeric tolerance either fixed value or percentagepublic java.lang.String getNumericToleranceValue()
public void enableNumericTolerance(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 negligable change.
value
- whether to use in SVG comparisonpublic boolean isNumericToleranceEnabled()
Determines whether to use numeric tolerance.
public void setXpathToReferencedSVG(java.lang.String xPathToReferencedSVG)
xPathToReferencedSVG
- XPath to the referenced SVG.public java.lang.String getXpathToReferencedSVG()