All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.applitools.eyes.FixedScaleProviderFactory Maven / Gradle / Ivy

There is a newer version: 3.11
Show newest version
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;

    /**
     *
     * @param scaleRatio The ratio to scale by.
     */
    public FixedScaleProviderFactory(double scaleRatio,
                                     PropertyHandler scaleProviderHandler) {
        super(scaleProviderHandler);
        this.scaleRatio = scaleRatio;
    }

    @Override
    protected ScaleProvider getScaleProviderImpl(int imageToScaleWidth) {
        return new FixedScaleProvider(scaleRatio);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy