Class TransparencyImageEffect

java.lang.Object
de.gurkenlabs.litiengine.graphics.ImageEffect
de.gurkenlabs.litiengine.graphics.TransparencyImageEffect
All Implemented Interfaces:
ITimeToLive, Comparable<ImageEffect>

public class TransparencyImageEffect extends ImageEffect
Applies a constant alpha multiplier to every pixel of an image for the effect's lifetime.
See Also:
  • Constructor Details

    • TransparencyImageEffect

      public TransparencyImageEffect(int ttl, float alpha)
      Initializes a new instance of the TransparencyImageEffect.
      Parameters:
      ttl - The time to live of this effect.
      alpha - the constant alpha to be multiplied with the alpha of the source. alpha must be a floating point number in the inclusive range [0.0, 1.0].
  • Method Details

    • apply

      public BufferedImage apply(BufferedImage image)
      Description copied from class: ImageEffect
      Applies this image effect to the specified BufferedImage.
      Specified by:
      apply in class ImageEffect
      Parameters:
      image - the BufferedImage to apply the effect to
      Returns:
      the BufferedImage with the effect applied