| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static double | interpolate(double from, double to, double t)
Utility function that interpolates between two double values. |
| public static <T extends Interpolatable | Returns: the intermediate array seriesthe first array series, not firstArraySeries, T[][] nullthe second array series, not secondArraySeries, double t)nullComputes an intermediate array series that consists of the pairwise interpolation between two
array series, using the same rules as described in |
| public static <T extends Interpolatable | Returns: the intermediate listthe first array, not firstArray, T[] nullthe second array, not secondArray, double t)nullComputes an intermediate array that consists of the pairwise interpolation between two arrays, using the following rules:
|
| public static <T> T | interpolateDiscrete(T from, T to, double t)
Utility function that interpolates between two discrete values, returning |
| public static double | interpolateDiscrete(double from, double to, double t)
Utility function that interpolates between two discrete values, returning |
| private static <T extends Interpolatable | interpolateEquisizedArraysPairwise(T[] firstArray, T[] secondArray, double t)
Computes an intermediate array that consists of the pairwise interpolation between two arrays of equal size, each containing up to 8 elements. |
| private static <T extends Interpolatable | interpolateEquisizedListsPairwise(List<T> firstList, List<T> secondList, double t)
Computes an intermediate list that consists of the pairwise interpolation between two lists of equal size, each containing up to 8 elements. |
| public static <T extends Interpolatable | Returns: the intermediate listthe first list, not firstList, List<T> nullthe second list, not secondList, double t)nullComputes an intermediate list that consists of the pairwise interpolation between two lists, using the following rules:
|
| public static Paint | interpolatePaint(Paint startValue, Paint endValue, double t)
Interpolates between potentially different types of paint. |
| public static LinearGradient | newSolidGradient(LinearGradient source, Color color)
Creates a new linear gradient that consists of two stops with the same color. |
| public static RadialGradient | newSolidGradient(RadialGradient source, Color color)
Creates a new radial gradient that consists of two stops with the same color. |
| InterpolationUtils | back to summary |
|---|---|
| private InterpolationUtils() | |
| interpolate | back to summary |
|---|---|
| public static double interpolate(double from, double to, double t) Utility function that interpolates between two double values. | |
| interpolateArraySeriesPairwise | back to summary |
|---|---|
| public static <T extends Interpolatable Computes an intermediate array series that consists of the pairwise interpolation between two
array series, using the same rules as described in
This method preferably returns existing array instances (i.e. the
| |
| interpolateArraysPairwise | back to summary |
|---|---|
| public static <T extends Interpolatable Computes an intermediate array that consists of the pairwise interpolation between two arrays, using the following rules:
firstArray or
secondArray arguments) as an indication to the caller that the result is shallow-equal
to either of the input arguments. Callers might depend on this behavior to optimize their own
object allocation strategy by quickly detecting whether anything has changed at all.
| |
| interpolateDiscrete | back to summary |
|---|---|
| public static <T> T interpolateDiscrete(T from, T to, double t) Utility function that interpolates between two discrete values, returning | |
| interpolateDiscrete | back to summary |
|---|---|
| public static double interpolateDiscrete(double from, double to, double t) Utility function that interpolates between two discrete values, returning | |
| interpolateEquisizedArraysPairwise | back to summary |
|---|---|
| private static <T extends Interpolatable Computes an intermediate array that consists of the pairwise interpolation between two arrays of equal size, each containing up to 8 elements. This method is an optimization: it does not allocate memory when the intermediate array is shallow-equal to the array that is passed into this method, i.e. its elements are references to the same objects. The existing array is returned in this case. | |
| interpolateEquisizedListsPairwise | back to summary |
|---|---|
| private static <T extends Interpolatable Computes an intermediate list that consists of the pairwise interpolation between two lists of equal size, each containing up to 8 elements. This method is an optimization: it does not allocate memory when the intermediate list is shallow-equal to the list that is passed into this method, i.e. its elements are references to the same objects. The existing list is returned in this case. | |
| interpolateListsPairwise | back to summary |
|---|---|
| public static <T extends Interpolatable Computes an intermediate list that consists of the pairwise interpolation between two lists, using the following rules:
firstList or
secondList arguments) as an indication to the caller that the result is shallow-equal
to either of the input arguments. Callers might depend on this behavior to optimize their own
object allocation strategy by quickly detecting whether anything has changed at all.
| |
| interpolatePaint | back to summary |
|---|---|
| public static Paint interpolatePaint(Paint startValue, Paint endValue, double t) Interpolates between potentially different types of paint. In addition to homogeneous interpolations between paints of the same type, the following heterogeneous interpolations are supported:
startValue is returned for t < 0.5,
and endValue is returned otherwise.
| |
| newSolidGradient | back to summary |
|---|---|
| public static LinearGradient newSolidGradient(LinearGradient source, Color color) Creates a new linear gradient that consists of two stops with the same color. | |
| newSolidGradient | back to summary |
|---|---|
| public static RadialGradient newSolidGradient(RadialGradient source, Color color) Creates a new radial gradient that consists of two stops with the same color. | |