Class Filters.GammaCorrectFilter

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

public static class Filters.GammaCorrectFilter
extends Object
implements IFilter<com.badlogic.gdx.graphics.Color>
An IFilter that performs a brightness adjustment to make dark areas lighter and light areas not much less bright.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    float gamma  
    float maxValue  
  • Constructor Summary

    Constructors 
    Constructor Description
    GammaCorrectFilter​(float gamma, float maxValue)
    Sets up a GammaCorrectFilter with the desired gamma adjustment.
  • 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

    • GammaCorrectFilter

      public GammaCorrectFilter​(float gamma, float maxValue)
      Sets up a GammaCorrectFilter with the desired gamma adjustment.
      Parameters:
      gamma - should be 1.0 or less, and must be greater than 0. Typical values are between 0.4 to 0.8.
      maxValue - the maximum brightness in the colors this will be passed; use MaxValueFilter for this
  • 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>