Target.Builder
class Target.Builder
Builder class for generating custom Target instances.
Summary
Public constructors |
|---|
Builder()Create a new |
|
Create a new builder based on an existing |
Public functions |
|
|---|---|
Target |
build()Builds and returns the resulting |
Target.Builder |
setExclusive(exclusive: Boolean)Set whether any color selected for this target is exclusive to this target only. |
Target.Builder |
setLightnessWeight(weight: @FloatRange(from = 0) Float)Set the weight of importance that this target will place on lightness values. |
Target.Builder |
setMaximumLightness(value: @FloatRange(from = 0, to = 1) Float)Set the maximum lightness value for this target. |
Target.Builder |
setMaximumSaturation(value: @FloatRange(from = 0, to = 1) Float)Set the maximum saturation value for this target. |
Target.Builder |
setMinimumLightness(value: @FloatRange(from = 0, to = 1) Float)Set the minimum lightness value for this target. |
Target.Builder |
setMinimumSaturation(value: @FloatRange(from = 0, to = 1) Float)Set the minimum saturation value for this target. |
Target.Builder |
setPopulationWeight(weight: @FloatRange(from = 0) Float)Set the weight of importance that this target will place on a color's population within the image. |
Target.Builder |
setSaturationWeight(weight: @FloatRange(from = 0) Float)Set the weight of importance that this target will place on saturation values. |
Target.Builder |
setTargetLightness(value: @FloatRange(from = 0, to = 1) Float)Set the target/ideal lightness value for this target. |
Target.Builder |
setTargetSaturation(value: @FloatRange(from = 0, to = 1) Float)Set the target/ideal saturation value for this target. |
Public constructors
Public functions
setExclusive
fun setExclusive(exclusive: Boolean): Target.Builder
Set whether any color selected for this target is exclusive to this target only. Defaults to true.
| Parameters | |
|---|---|
exclusive: Boolean |
true if any the color is exclusive to this target, or false is the color can be selected for other targets. |
setLightnessWeight
fun setLightnessWeight(weight: @FloatRange(from = 0) Float): Target.Builder
Set the weight of importance that this target will place on lightness values.
The larger the weight, relative to the other weights, the more important that a color being close to the target value has on selection.
A weight of 0 means that it has no weight, and thus has no bearing on the selection.
| See also | |
|---|---|
setTargetLightness |
setMaximumLightness
fun setMaximumLightness(value: @FloatRange(from = 0, to = 1) Float): Target.Builder
Set the maximum lightness value for this target.
setMaximumSaturation
fun setMaximumSaturation(value: @FloatRange(from = 0, to = 1) Float): Target.Builder
Set the maximum saturation value for this target.
setMinimumLightness
fun setMinimumLightness(value: @FloatRange(from = 0, to = 1) Float): Target.Builder
Set the minimum lightness value for this target.
setMinimumSaturation
fun setMinimumSaturation(value: @FloatRange(from = 0, to = 1) Float): Target.Builder
Set the minimum saturation value for this target.
setPopulationWeight
fun setPopulationWeight(weight: @FloatRange(from = 0) Float): Target.Builder
Set the weight of importance that this target will place on a color's population within the image.
The larger the weight, relative to the other weights, the more important that a color's population being close to the most populous has on selection.
A weight of 0 means that it has no weight, and thus has no bearing on the selection.
setSaturationWeight
fun setSaturationWeight(weight: @FloatRange(from = 0) Float): Target.Builder
Set the weight of importance that this target will place on saturation values.
The larger the weight, relative to the other weights, the more important that a color being close to the target value has on selection.
A weight of 0 means that it has no weight, and thus has no bearing on the selection.
| See also | |
|---|---|
setTargetSaturation |
setTargetLightness
fun setTargetLightness(value: @FloatRange(from = 0, to = 1) Float): Target.Builder
Set the target/ideal lightness value for this target.
setTargetSaturation
fun setTargetSaturation(value: @FloatRange(from = 0, to = 1) Float): Target.Builder
Set the target/ideal saturation value for this target.