Package squidpony.squidgrid.gui.gdx
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)
-
Field Details
-
Constructor Details
-
MultiLerpFilter
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 towardsg
- the green components to lerp towardsb
- the blue components to lerp towardsa
- the opacity components to lerp towardsamount
- the amounts to lerp by, should each be between 0.0 and 1.0
-
MultiLerpFilter
Sets up a MultiLerpFilter with the desired colors to linearly interpolate towards and their amounts.- Parameters:
colors
- the Colors to lerp towardsamount
- the amounts to lerp by, should each be between 0.0 and 1.0
-
-
Method Details