Class HslAdjustment.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.effect.HslAdjustment.Builder
-
- Enclosing class:
- HslAdjustment
public static final class HslAdjustment.Builder extends Object
A builder forHslAdjustment
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new instance with the default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HslAdjustment.Builder
adjustHue(float hueAdjustmentDegrees)
Rotates the hue of the frame byhueAdjustmentDegrees
.HslAdjustment.Builder
adjustLightness(float lightnessAdjustment)
Adjusts the lightness of the frame bylightnessAdjustment
.HslAdjustment.Builder
adjustSaturation(float saturationAdjustment)
Adjusts the saturation of the frame bysaturationAdjustment
.HslAdjustment
build()
Creates a newHslAdjustment
instance.
-
-
-
Method Detail
-
adjustHue
@CanIgnoreReturnValue public HslAdjustment.Builder adjustHue(float hueAdjustmentDegrees)
Rotates the hue of the frame byhueAdjustmentDegrees
.The Hue of the frame is defined in the interval of [0, 360] degrees. The actual degrees of hue adjustment applied is
hueAdjustmentDegrees % 360
.- Parameters:
hueAdjustmentDegrees
- The hue adjustment in rotation degrees. The default value is0
, which means no change is applied.
-
adjustSaturation
@CanIgnoreReturnValue public HslAdjustment.Builder adjustSaturation(@FloatRange(from=-100.0,to=100.0) float saturationAdjustment)
Adjusts the saturation of the frame bysaturationAdjustment
.Saturation is defined in the interval of [0, 100] where a saturation of
0
will generate a grayscale frame and a saturation of100
has a maximum separation between the colors.- Parameters:
saturationAdjustment
- The difference of how much the saturation will be adjusted in either direction. Needs to be in the interval of [-100, 100] and the default value is0
, which means no change is applied.
-
adjustLightness
@CanIgnoreReturnValue public HslAdjustment.Builder adjustLightness(@FloatRange(from=-100.0,to=100.0) float lightnessAdjustment)
Adjusts the lightness of the frame bylightnessAdjustment
.Lightness is defined in the interval of [0, 100] where a lightness of
0
is a black frame and a lightness of100
is a white frame.- Parameters:
lightnessAdjustment
- The difference by how much the lightness will be adjusted in either direction. Needs to be in the interval of [-100, 100] and the default value is0
, which means no change is applied.
-
build
public HslAdjustment build()
Creates a newHslAdjustment
instance.
-
-