Class Filters.LerpFilter

java.lang.Object
squidpony.squidgrid.gui.gdx.Filters.LerpFilter
All Implemented Interfaces:
IFilter<com.badlogic.gdx.graphics.Color>
Enclosing class:
Filters

public static class Filters.LerpFilter
extends Object
implements IFilter<com.badlogic.gdx.graphics.Color>
An IFilter that is constructed with a color and linear-interpolates any color it is told to alter toward the color it was constructed with.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    float a  
    float amount  
    float b  
    float g  
    float r  
  • Constructor Summary

    Constructors 
    Constructor Description
    LerpFilter​(float r, float g, float b, float a, float amount)
    Sets up a LerpFilter with the desired color to linearly interpolate towards.
    LerpFilter​(com.badlogic.gdx.graphics.Color color, float amount)
    Sets up a LerpFilter with the desired color to linearly interpolate towards.
  • Method Summary

    Modifier and Type Method Description
    com.badlogic.gdx.graphics.Color alter​(float r, float g, float b, float a)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • r

      public float r
    • g

      public float g
    • b

      public float b
    • a

      public float a
    • amount

      public float amount
  • Constructor Details

    • LerpFilter

      public LerpFilter​(float r, float g, float b, float a, float amount)
      Sets up a LerpFilter with the desired color to linearly interpolate towards.
      Parameters:
      r - the red component to lerp towards
      g - the green component to lerp towards
      b - the blue component to lerp towards
      a - the opacity component to lerp towards
      amount - the amount to lerp by, should be between 0.0 and 1.0
    • LerpFilter

      public LerpFilter​(com.badlogic.gdx.graphics.Color color, float amount)
      Sets up a LerpFilter with the desired color to linearly interpolate towards.
      Parameters:
      color - the Color to lerp towards
      amount - the amount to lerp by, should be between 0.0 and 1.0
  • Method Details

    • alter

      public com.badlogic.gdx.graphics.Color alter​(float r, float g, float b, float a)
      Specified by:
      alter in interface IFilter<com.badlogic.gdx.graphics.Color>