Class FloatFilter

java.lang.Object
squidpony.squidgrid.gui.gdx.FloatFilter
Direct Known Subclasses:
FloatFilters.ChainFilter, FloatFilters.ColorizeFilter, FloatFilters.DistinctRedGreenFilter, FloatFilters.GrayscaleFilter, FloatFilters.HSVFilter, FloatFilters.IdentityFilter, FloatFilters.LerpFilter, FloatFilters.MultiLerpFilter, FloatFilters.PaletteFilter, FloatFilters.PaletteReducerFilter, FloatFilters.YCbCrFilter, FloatFilters.YCoCgFilter, FloatFilters.YCwCmFilter

public abstract class FloatFilter
extends Object
Like IFilter, but produces packed floats that encode colors instead of Color objects. Accepts packed float colors (as produced by Color.toFloatBits(), or given in SColor documentation) or Color objects (including SColor instances).
Created by Tommy Ettinger on 7/22/2018.
  • Constructor Summary

    Constructors 
    Constructor Description
    FloatFilter()  
  • Method Summary

    Modifier and Type Method Description
    abstract float alter​(float color)
    Takes a packed float color and produces a potentially-different packed float color that this FloatFilter edited.
    float alter​(com.badlogic.gdx.graphics.Color color)
    Takes a Color or subclass of Color (such as SColor, which is a little more efficient here) and produces a packed float color that this FloatFilter edited.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • alter

      public abstract float alter​(float color)
      Takes a packed float color and produces a potentially-different packed float color that this FloatFilter edited.
      Parameters:
      color - a packed float color, as produced by Color.toFloatBits()
      Returns:
      a packed float color, as produced by Color.toFloatBits()
    • alter

      public float alter​(com.badlogic.gdx.graphics.Color color)
      Takes a Color or subclass of Color (such as SColor, which is a little more efficient here) and produces a packed float color that this FloatFilter edited.
      Parameters:
      color - a Color or instance of a subclass such as SColor
      Returns:
      a packed float color, as produced by Color.toFloatBits()