Shadow Under Line
data class ShadowUnderLine(val color: Color = Color.Black, val brush: Brush? = null, val alpha: Float = 0.1f, val style: DrawStyle = Fill, val colorFilter: ColorFilter? = null, val blendMode: BlendMode = DrawScope.DefaultBlendMode, val draw: DrawScope.(Path) -> Unit = { path ->
if (brush != null) {
drawPath(path, brush, alpha, style, colorFilter, blendMode)
} else {
drawPath(path, color, alpha, style, colorFilter, blendMode)
}
}, val drawMultiColor: DrawScope.(Path, Color, Brush?) -> Unit = { path, multiColor, multiColorBrush ->
if (multiColorBrush != null) {
drawPath(path, multiColorBrush, alpha, style, colorFilter, blendMode)
} else {
drawPath(path, multiColor, alpha, style, colorFilter, blendMode)
}
})
Controls the drawing behaviour of the area/section under the line.
Parameters
color
Color to be applied to the path
alpha
Opacity to be applied to the path from 0.0f to 1.0f representing fully transparent to fully opaque respectively
style
Whether or not the path is stroked or filled in
color Filter
ColorFilter to apply to the color when drawn into the destination
blend Mode
Blending algorithm to be applied to the path when it is drawn
draw
override this to change the default drawPath implementation. You are provided with the Path of the line
Constructors
Link copied to clipboard
constructor(color: Color = Color.Black, brush: Brush? = null, alpha: Float = 0.1f, style: DrawStyle = Fill, colorFilter: ColorFilter? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode, draw: DrawScope.(Path) -> Unit = { path ->
if (brush != null) {
drawPath(path, brush, alpha, style, colorFilter, blendMode)
} else {
drawPath(path, color, alpha, style, colorFilter, blendMode)
}
}, drawMultiColor: DrawScope.(Path, Color, Brush?) -> Unit = { path, multiColor, multiColorBrush ->
if (multiColorBrush != null) {
drawPath(path, multiColorBrush, alpha, style, colorFilter, blendMode)
} else {
drawPath(path, multiColor, alpha, style, colorFilter, blendMode)
}
})