com.applitools.eyes.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-java3-jersey2x Show documentation
Show all versions of eyes-sdk-core-java3-jersey2x Show documentation
Applitools Eyes SDK base for Java
package com.applitools.eyes;
import com.applitools.utils.PropertyHandler;
import java.awt.image.BufferedImage;
/**
* Factory implementation for creating {@link FixedScaleProvider} instances.
*/
public class FixedScaleProviderFactory extends ScaleProviderFactory {
private final double scaleRatio;
private final ScaleMethod scaleMethod;
/**
*
* @param scaleRatio The ratio to scale by.
* @param scaleMethod The scale method to use for scaling.
*/
public FixedScaleProviderFactory(double scaleRatio, ScaleMethod scaleMethod,
PropertyHandler scaleProviderHandler) {
super(scaleProviderHandler);
this.scaleRatio = scaleRatio;
this.scaleMethod = scaleMethod;
}
@Override
protected ScaleProvider getScaleProviderImpl(int imageToScaleWidth) {
return new FixedScaleProvider(scaleRatio, scaleMethod);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy