- java.lang.Object
-
- org.testfx.service.support.impl.CaptureSupportImpl
-
- All Implemented Interfaces:
CaptureSupport
public class CaptureSupportImpl extends Object implements CaptureSupport
-
-
Field Summary
Fields Modifier and Type Field Description static String
PNG_IMAGE_FORMAT
-
Constructor Summary
Constructors Constructor Description CaptureSupportImpl(BaseRobot baseRobot)
-
Method Summary
Modifier and Type Method Description javafx.scene.image.Image
annotateImage(javafx.scene.shape.Shape shape, javafx.scene.image.Image image)
NOT YET IMPLEMENTEDjavafx.scene.image.Image
captureNode(javafx.scene.Node node)
Returns a snapshot of the node.javafx.scene.image.Image
captureRegion(javafx.geometry.Rectangle2D region)
Returns a screenshot of the given region.javafx.scene.image.Image
loadImage(Path path)
Loads the image file from the given path.PixelMatcherResult
matchImages(javafx.scene.image.Image image0, javafx.scene.image.Image image1, PixelMatcher pixelMatcher)
Compares two images and returns aPixelMatcherResult
that defines the how similar/dissimilar one was from the other.void
saveImage(javafx.scene.image.Image image, Path path)
Saves the given image to the given path.
-
-
-
Field Detail
-
PNG_IMAGE_FORMAT
public static final String PNG_IMAGE_FORMAT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CaptureSupportImpl
public CaptureSupportImpl(BaseRobot baseRobot)
-
-
Method Detail
-
captureNode
public javafx.scene.image.Image captureNode(javafx.scene.Node node)
Description copied from interface:CaptureSupport
Returns a snapshot of the node.- Specified by:
captureNode
in interfaceCaptureSupport
-
captureRegion
public javafx.scene.image.Image captureRegion(javafx.geometry.Rectangle2D region)
Description copied from interface:CaptureSupport
Returns a screenshot of the given region.- Specified by:
captureRegion
in interfaceCaptureSupport
-
loadImage
public javafx.scene.image.Image loadImage(Path path)
Description copied from interface:CaptureSupport
Loads the image file from the given path.- Specified by:
loadImage
in interfaceCaptureSupport
-
saveImage
public void saveImage(javafx.scene.image.Image image, Path path)
Description copied from interface:CaptureSupport
Saves the given image to the given path.- Specified by:
saveImage
in interfaceCaptureSupport
-
annotateImage
public javafx.scene.image.Image annotateImage(javafx.scene.shape.Shape shape, javafx.scene.image.Image image)
Description copied from interface:CaptureSupport
NOT YET IMPLEMENTED- Specified by:
annotateImage
in interfaceCaptureSupport
-
matchImages
public PixelMatcherResult matchImages(javafx.scene.image.Image image0, javafx.scene.image.Image image1, PixelMatcher pixelMatcher)
Description copied from interface:CaptureSupport
Compares two images and returns aPixelMatcherResult
that defines the how similar/dissimilar one was from the other.- Specified by:
matchImages
in interfaceCaptureSupport
-
-