public class ContextBasedScaleProvider extends Object implements com.applitools.eyes.ScaleProvider
Constructor and Description |
---|
ContextBasedScaleProvider(com.applitools.eyes.Logger logger,
com.applitools.eyes.RectangleSize topLevelContextEntireSize,
com.applitools.eyes.RectangleSize viewportSize,
double devicePixelRatio,
boolean isMobileDevice) |
Modifier and Type | Method and Description |
---|---|
double |
getScaleRatio() |
void |
updateScaleRatio(int imageToScaleWidth)
Set the scale ratio based on the given image.
|
public ContextBasedScaleProvider(com.applitools.eyes.Logger logger, com.applitools.eyes.RectangleSize topLevelContextEntireSize, com.applitools.eyes.RectangleSize viewportSize, double devicePixelRatio, boolean isMobileDevice)
topLevelContextEntireSize
- The total size of the top level
context. E.g., for selenium this
would be the document size of the top
level frame.viewportSize
- The viewport size.devicePixelRatio
- The device pixel ratio of the
platform on which the application is
running.logger
- the logger.isMobileDevice
- is mobile device.public double getScaleRatio()
getScaleRatio
in interface com.applitools.eyes.ScaleProvider
public void updateScaleRatio(int imageToScaleWidth)
imageToScaleWidth
- The width of the image to scale, used for calculating the scale ratio.Copyright © 2021. All rights reserved.