invoke

@JvmName(name = "fromColors")
operator fun invoke(colors: List<KalugaColor>, orientation: GradientStyle.Linear.Orientation = Orientation.LEFT_RIGHT): GradientStyle.Linear

Creates a Linear gradient style using a list of KalugaColor and an Orientation

Return

the Linear gradient

Parameters

colors

the list of KalugaColor on the gradient. Will be spread evenly across the gradient

orientation

the Orientation of the gradient

Throws

if colors size is smaller than 2


@JvmName(name = "fromColorPoints")
operator fun invoke(colorPoints: List<GradientStyle.ColorPoint>, orientation: GradientStyle.Linear.Orientation = Orientation.LEFT_RIGHT): GradientStyle.Linear

Creates a Linear gradient style using a list of ColorPoint and an Orientation

Return

the Linear gradient

Parameters

colorPoints

the list of ColorPoint on the gradient

orientation

the Orientation of the gradient