public abstract class EyesScreenshot extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BufferedImage |
image |
| Constructor and Description |
|---|
EyesScreenshot(BufferedImage image) |
| Modifier and Type | Method and Description |
|---|---|
abstract Location |
convertLocation(Location location,
CoordinatesType from,
CoordinatesType to)
Converts a location's coordinates with the
from coordinates type
to the to coordinates type. |
Region |
convertRegionLocation(Region region,
CoordinatesType from,
CoordinatesType to)
Converts a region's location coordinates with the
from
coordinates type to the to coordinates type. |
BufferedImage |
getImage() |
Region |
getIntersectedRegion(Region region,
CoordinatesType coordinatesType)
Get the intersection of the given region with the screenshot.
|
abstract Region |
getIntersectedRegion(Region region,
CoordinatesType originalCoordinatesType,
CoordinatesType resultCoordinatesType)
Get the intersection of the given region with the screenshot.
|
abstract Location |
getLocationInScreenshot(Location location,
CoordinatesType coordinatesType)
Calculates the location in the screenshot of the location given as
parameter.
|
abstract EyesScreenshot |
getSubScreenshot(Region region,
CoordinatesType coordinatesType,
boolean throwIfClipped)
Returns a part of the screenshot based on the given region.
|
protected BufferedImage image
public EyesScreenshot(BufferedImage image)
public BufferedImage getImage()
public abstract EyesScreenshot getSubScreenshot(Region region, CoordinatesType coordinatesType, boolean throwIfClipped)
region - The region for which we should get the sub screenshot.coordinatesType - How should the region be calculated on the screenshot image.throwIfClipped - Throw an EyesException if the region is not
fully contained in the screenshot.public abstract Location convertLocation(Location location, CoordinatesType from, CoordinatesType to)
from coordinates type
to the to coordinates type.location - The location which coordinates needs to be converted.from - The current coordinates type for location.to - The target coordinates type for location.location to
the to coordinates type.public abstract Location getLocationInScreenshot(Location location, CoordinatesType coordinatesType) throws OutOfBoundsException
location - The location as coordinates inside the current frame.coordinatesType - The coordinates type of location.OutOfBoundsException - If the location is
not inside the frame's region in the screenshot.public abstract Region getIntersectedRegion(Region region, CoordinatesType originalCoordinatesType, CoordinatesType resultCoordinatesType)
region - The region to intersect.originalCoordinatesType - The coordinates type of region.resultCoordinatesType - The coordinates type of the resulting region.resultCoordinatesType
coordinates.public Region getIntersectedRegion(Region region, CoordinatesType coordinatesType)
region - The region to intersect.coordinatesType - The coordinates type of region.coordinatesType coordinates.public Region convertRegionLocation(Region region, CoordinatesType from, CoordinatesType to)
from
coordinates type to the to coordinates type.region - The region which location's coordinates needs to be converted.from - The current coordinates type for region.to - The target coordinates type for region.region to
the to coordinates type.Copyright © 2017. All rights reserved.