com.applitools.eyes.scaling.FixedScaleProviderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-sdk-core-java5 Show documentation
Show all versions of eyes-sdk-core-java5 Show documentation
Applitools Eyes SDK base for Java
package com.applitools.eyes.scaling;
import com.applitools.eyes.Logger;
import com.applitools.eyes.ScaleProvider;
import com.applitools.eyes.ScaleProviderFactory;
import com.applitools.utils.PropertyHandler;
/**
* Factory implementation for creating {@link FixedScaleProvider} instances.
*/
public class FixedScaleProviderFactory extends ScaleProviderFactory {
private FixedScaleProvider fixedScaleProvider;
/**
*
* @param scaleRatio The ratio to scale by.
*/
public FixedScaleProviderFactory(Logger logger, double scaleRatio,
PropertyHandler scaleProviderHandler) {
super(logger, scaleProviderHandler);
this.fixedScaleProvider = new FixedScaleProvider(logger, scaleRatio);
}
@Override
protected ScaleProvider getScaleProviderImpl(int imageToScaleWidth) {
return fixedScaleProvider;
}
}