Package toxi.color
Class ToneMap
java.lang.Object
toxi.color.ToneMap
-
Field Summary
-
Constructor Summary
ConstructorDescriptionToneMap
(float min, float max, ColorGradient gradient) ToneMap
(float a, float b, ReadonlyTColor colA, ReadonlyTColor colB) ToneMap
(float min, float max, ReadonlyTColor colA, ReadonlyTColor colB, int res) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
getARGBToneFor
(float t) final ReadonlyTColor
getToneFor
(float t) int[]
getToneMappedArray
(float[] src, int[] pixels) Applies the tonemap to all elements in the given source array of single precision values and places the resulting ARGB color in the corresponding index of the target pixel buffer.int[]
getToneMappedArray
(float[] src, int[] pixels, int offset) int[]
getToneMappedArray
(int[] src, int[] pixels) Applies the tonemap to all elements in the given source array of integers and places the resulting ARGB color in the corresponding index of the target pixel buffer.int[]
getToneMappedArray
(int[] src, int[] pixels, int offset) void
-
Field Details
-
map
-
colors
-
-
Constructor Details
-
ToneMap
-
ToneMap
-
ToneMap
-
ToneMap
-
-
Method Details
-
getARGBToneFor
public final int getARGBToneFor(float t) -
getToneFor
-
getToneMappedArray
public int[] getToneMappedArray(float[] src, int[] pixels) Applies the tonemap to all elements in the given source array of single precision values and places the resulting ARGB color in the corresponding index of the target pixel buffer. If the target buffer is null, a new one will be created automatically.- Parameters:
src
- source array of values to be tone mappedpixels
- target pixel buffer- Returns:
- pixel array
-
getToneMappedArray
public int[] getToneMappedArray(float[] src, int[] pixels, int offset) -
getToneMappedArray
public int[] getToneMappedArray(int[] src, int[] pixels) Applies the tonemap to all elements in the given source array of integers and places the resulting ARGB color in the corresponding index of the target pixel buffer. If the target buffer is null, a new one will be created automatically.- Parameters:
src
- source array of values to be tone mappedpixels
- target pixel buffer- Returns:
- pixel array
-
getToneMappedArray
public int[] getToneMappedArray(int[] src, int[] pixels, int offset) -
setMapFunction
- Parameters:
func
-- See Also:
-