public static class FloatFilters.PaletteFilter extends FloatFilter
FloatFilters.PaletteReducerFilter
is also
an option; it uses more memory but is faster to look up colors in larger palettes (it has a maximum size of 256
colors, though, which this class doesn't).Modifier and Type | Field and Description |
---|---|
float[] |
targets |
Constructor and Description |
---|
PaletteFilter(com.badlogic.gdx.graphics.Color[] targets)
Builds a PaletteFilter with an array of Color objects that this will choose from.
|
PaletteFilter(float... targets)
Builds a PaletteFilter with an array of packed float colors that this will choose from.
|
Modifier and Type | Method and Description |
---|---|
float |
alter(float color)
Takes a packed float color and produces a potentially-different packed float color that this FloatFilter edited.
|
alter
public PaletteFilter(com.badlogic.gdx.graphics.Color[] targets)
targets
- an array of libGDX Color objects; must not be null or emptypublic PaletteFilter(float... targets)
targets
- an array or vararg of packed float colors; must not be null or emptypublic float alter(float color)
alter
in class FloatFilter
color
- a packed float color, as produced by Color.toFloatBits()
Color.toFloatBits()
Copyright © Eben Howard 2012–2022. All rights reserved.