Package squidpony.squidgrid.gui.gdx
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
-
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)
-
Field Details
-
Constructor Details
-
LerpFilter
Sets up a LerpFilter with the desired color to linearly interpolate towards.- Parameters:
r
- the red component to lerp towardsg
- the green component to lerp towardsb
- the blue component to lerp towardsa
- the opacity component to lerp towardsamount
- the amount to lerp by, should be between 0.0 and 1.0
-
LerpFilter
Sets up a LerpFilter with the desired color to linearly interpolate towards.- Parameters:
color
- the Color to lerp towardsamount
- the amount to lerp by, should be between 0.0 and 1.0
-
-
Method Details