public class SVGConfiguration
extends java.lang.Object
DocumentComparator
to configure its behaviour when comparing SVG.Constructor and Description |
---|
SVGConfiguration()
Initialise a new
SVGConfiguration with default settings. |
Modifier and Type | Method and Description |
---|---|
void |
enableNumericTolerance(boolean value)
Sets whether to use a numeric tolerance.
|
double |
getFallbackChangePercentage()
Gets the fallback change percentage setting for SVG comparison results.
|
java.lang.String |
getInputASVGMarkupStyle()
Gets the Input A SVG markup style used for SVG comparison results.
|
java.lang.String |
getInputBSVGMarkupStyle()
Gets the current Input B SVG markup style used for SVG comparison results.
|
java.lang.String |
getNumericToleranceValue()
Gets the numeric tolerance value for SVG comparison results.
|
SVGGranularity |
getSVGComparisonGranularity()
Returns the
SVGGranularity setting for SVG comparison results. |
java.lang.String |
getXpathToReferencedSVG()
Gets the XPath to the referenced SVG.
|
java.lang.String |
getZIndexSVGMarkupStyle()
Gets the current Input Z SVG markup style used for SVG comparison results.
|
boolean |
isEnabled()
Returns whether SVG comparison is enabled.
|
boolean |
isFallbackEnabled()
Returns enabled state of fall back feature in the SVG comparison.
|
boolean |
isNumericToleranceEnabled()
Determines whether to use numeric tolerance in the SVG comparison.
|
boolean |
isZIndexEnabled()
Returns whether Z-index changes are shown in the SVG Comparisons.
|
void |
setEnabled(boolean value)
Sets whether the
DocumentComparator should do SVG comparison. |
void |
setFallback(boolean value)
Sets whether to fall back
SVGGranularity .ADJACENT. |
void |
setFallbackChangePercentage(double fallbackChangePercentage)
Sets fall back change percentage setting for SVG comparison results.
|
void |
setInputASVGMarkupStyle(java.lang.String inputASVGMarkupStyle)
Sets the Input A SVG markup style used for SVG comparison results.
|
void |
setInputBSVGMarkupStyle(java.lang.String inputBSVGMarkupStyle)
Sets the Input B SVG markup style used 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
SVGGranularity 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 used for SVG comparison results.
|
public SVGConfiguration()
SVGConfiguration
with default settings.public void setEnabled(boolean value)
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()
public void setSVGComparisonGranularity(SVGGranularity svgComparisonGranularity)
SVGGranularity
at which the differences between two SVG images will be represented.
The default is DETAILED_ADJACENT.svgComparisonGranularity
- an instance of SVGGranularity
public SVGGranularity getSVGComparisonGranularity()
SVGGranularity
setting for SVG comparison results.SVGGranularity
public void setZIndex(boolean value)
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 show Z-index changes in the SVG comparisonpublic boolean isZIndexEnabled()
public void setFallback(boolean value)
SVGGranularity
.ADJACENT. SVG comparison granularity will fall back to
SVGGranularity
.ADJACENT if SVG exceeds the percentage of changed elements defined by FallbackChangePercentage.value
- whether to fall back to SVGGranularity
.ADJACENT if percentage of changed elements is
above the FallbackChangePercentage threshold.public boolean isFallbackEnabled()
public void setFallbackChangePercentage(double fallbackChangePercentage)
SVGGranularity
.ADJACENT.
The default value is 30.00%.fallbackChangePercentage
- the threshold value for changed elements before falling back to
SVGGranularity
.ADJACENT.public double getFallbackChangePercentage()
Double
.public void setInputASVGMarkupStyle(java.lang.String inputASVGMarkupStyle)
inputASVGMarkupStyle
- the Input A SVG markup style.public java.lang.String getInputASVGMarkupStyle()
public void setInputBSVGMarkupStyle(java.lang.String inputBSVGMarkupStyle)
inputBSVGMarkupStyle
- the Input B SVG markup style.public java.lang.String getInputBSVGMarkupStyle()
public void setZIndexSVGMarkupStyle(java.lang.String zIndexSVGMarkupStyle)
zIndexSVGMarkupStyle
- the Z index SVG markup style.public 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)
value
- whether to use a numeric tolerance in SVG comparison.public boolean isNumericToleranceEnabled()
public void setXpathToReferencedSVG(java.lang.String xPathToReferencedSVG)
xPathToReferencedSVG
- XPath to the referenced SVG.public java.lang.String getXpathToReferencedSVG()