Package org.testfx.service.support.impl
Class PixelMatcherRgb
java.lang.Object
org.testfx.service.support.impl.PixelMatcherBase
org.testfx.service.support.impl.PixelMatcherRgb
- All Implemented Interfaces:
ColorMatcher,PixelMatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate doubleblendToWhite(double gray, double factor) javafx.scene.image.WritableImagecreateEmptyMatchImage(javafx.scene.image.Image image0, javafx.scene.image.Image image1) Creates a newWritableImageusingimage0's width andimage1's height.javafx.scene.paint.ColorcreateMatchColor(javafx.scene.paint.Color color0, javafx.scene.paint.Color color1) Creates a color that represents a match between the two images' pixels.booleanmatchColors(javafx.scene.paint.Color color0, javafx.scene.paint.Color color1) Returns true ifcolor0is close enough tocolor1as determined by a color distance/factor.Methods inherited from class org.testfx.service.support.impl.PixelMatcherBase
matchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testfx.service.support.PixelMatcher
createNonMatchColor, match
-
Field Details
-
colorBlendFactor
private final double colorBlendFactor -
minColorDistSq
private final double minColorDistSq
-
-
Constructor Details
-
PixelMatcherRgb
public PixelMatcherRgb() -
PixelMatcherRgb
public PixelMatcherRgb(double minColorDistFactor, double colorBlendFactor)
-
-
Method Details
-
matchColors
public boolean matchColors(javafx.scene.paint.Color color0, javafx.scene.paint.Color color1) Description copied from interface:ColorMatcherReturns true ifcolor0is close enough tocolor1as determined by a color distance/factor.- Specified by:
matchColorsin interfaceColorMatcher
-
createEmptyMatchImage
public javafx.scene.image.WritableImage createEmptyMatchImage(javafx.scene.image.Image image0, javafx.scene.image.Image image1) Description copied from interface:PixelMatcherCreates a newWritableImageusingimage0's width andimage1's height.- Specified by:
createEmptyMatchImagein interfacePixelMatcher
-
createMatchColor
public javafx.scene.paint.Color createMatchColor(javafx.scene.paint.Color color0, javafx.scene.paint.Color color1) Description copied from interface:PixelMatcherCreates a color that represents a match between the two images' pixels.- Specified by:
createMatchColorin interfacePixelMatcher
-
blendToWhite
private double blendToWhite(double gray, double factor)
-