Package-private constructor.
Parameters:
-
fractions - numbers ranging from 0.0 to 1.0 specifying the
distribution of colors along the gradient
-
colors - array of colors corresponding to each fractional value
-
cycleMethod - either {@code NO_CYCLE}, {@code REFLECT},
or {@code REPEAT}
-
colorSpace - which color space to use for interpolation,
either {@code SRGB} or {@code LINEAR_RGB}
-
gradientTransform - transform to apply to the gradient
Throws:
-
NullPointerException - if {@code fractions} array is null,
or {@code colors} array is null,
or {@code gradientTransform} is null,
or {@code cycleMethod} is null,
or {@code colorSpace} is null
-
IllegalArgumentException - if {@code fractions.length != colors.length},
or {@code colors} is less than 2 in size,
or a {@code fractions} value is less than 0.0 or greater than 1.0,
or the {@code fractions} are not provided in strictly increasing order