Package com.applitools.eyes
Class Location
- java.lang.Object
-
- com.applitools.eyes.Location
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetX()intgetY()inthashCode()Locationoffset(int dx, int dy)Get a location translated by the specified amount.Locationoffset(Location amount)Get a location translated by the specified amount.Locationscale(double scaleRatio)Get a scaled location.StringtoString()StringtoStringForFilename()
-
-
-
Field Detail
-
ZERO
public static final Location ZERO
-
-
Constructor Detail
-
Location
public Location()
-
Location
public Location(int x, int y)Creates a Location instance.- Parameters:
x- The X coordinate of this location.y- The Y coordinate of this location.
-
Location
public Location(Location other)
Creates a location from another location instance.- Parameters:
other- A location instance from which to create the location.
-
-
Method Detail
-
offset
public Location offset(int dx, int dy)
Get a location translated by the specified amount.- Parameters:
dx- The amount to offset the x-coordinate.dy- The amount to offset the y-coordinate.- Returns:
- A location translated by the specified amount.
-
offset
public Location offset(Location amount)
Get a location translated by the specified amount.- Parameters:
amount- The amount to offset.- Returns:
- A location translated by the specified amount.
-
scale
public Location scale(double scaleRatio)
Get a scaled location.- Parameters:
scaleRatio- The ratio by which to scale the results.- Returns:
- A scaled copy of the current location.
-
getX
public int getX()
- Returns:
- The X coordinate of this location.
-
getY
public int getY()
- Returns:
- The Y coordinate of this location.
-
toStringForFilename
public String toStringForFilename()
-
-