Class Filters.MultiLerpFilter

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

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

    Fields 
    Modifier and Type Field Description
    float[] state  
  • Constructor Summary

    Constructors 
    Constructor Description
    MultiLerpFilter​(float[] r, float[] g, float[] b, float[] a, float[] amount)
    Sets up a MultiLerpFilter with the desired colors to linearly interpolate towards; the lengths of each given array should be identical.
    MultiLerpFilter​(com.badlogic.gdx.graphics.Color[] colors, float[] amount)
    Sets up a MultiLerpFilter with the desired colors to linearly interpolate towards and their amounts.
  • 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

  • Constructor Details

    • MultiLerpFilter

      public MultiLerpFilter​(float[] r, float[] g, float[] b, float[] a, float[] amount)
      Sets up a MultiLerpFilter with the desired colors to linearly interpolate towards; the lengths of each given array should be identical.
      Parameters:
      r - the red components to lerp towards
      g - the green components to lerp towards
      b - the blue components to lerp towards
      a - the opacity components to lerp towards
      amount - the amounts to lerp by, should each be between 0.0 and 1.0
    • MultiLerpFilter

      public MultiLerpFilter​(com.badlogic.gdx.graphics.Color[] colors, float[] amount)
      Sets up a MultiLerpFilter with the desired colors to linearly interpolate towards and their amounts.
      Parameters:
      colors - the Colors to lerp towards
      amount - the amounts to lerp by, should each 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>