Class OverlayFactory

java.lang.Object
is.galia.operation.overlay.OverlayFactory

public final class OverlayFactory extends Object
Provides access to Overlay instances.
  • Constructor Details

    • OverlayFactory

      public OverlayFactory()
  • Method Details

    • newOverlay

      public Optional<Overlay> newOverlay(Delegate delegate) throws Exception
      Factory method that returns a new Overlay based on either the configuration, or the delegate method return value, depending on the setting of Key.OVERLAY_STRATEGY.
      Parameters:
      delegate - Required when getStrategy() returns OverlayFactory.Strategy.DELEGATE_METHOD. May be null otherwise.
      Returns:
      Instance respecting the overlay strategy and given arguments.
      Throws:
      Exception
    • shouldApplyToImage

      public boolean shouldApplyToImage(Size outputImageSize)
      Parameters:
      outputImageSize -
      Returns:
      Whether an overlay should be applied to an output image with the given dimensions.