Skip to content

Instantly share code, notes, and snippets.

@jmadaminov
Created May 22, 2022 21:16
Show Gist options
  • Save jmadaminov/562fd9e9913ad19148f5a36c4f7c9d17 to your computer and use it in GitHub Desktop.
Save jmadaminov/562fd9e9913ad19148f5a36c4f7c9d17 to your computer and use it in GitHub Desktop.
Draw on path
val strokeColor = Color(0x80ffffff)
val transparent = Color.Transparent
drawPath(
path = path,
color = strokeColor,
style = Stroke(1f),
blendMode = BlendMode.Luminosity
// blendMode = BlendMode.Luminosity
)
drawPath(
path = path,
brush = Brush.verticalGradient(listOf(strokeColor, transparent)),
blendMode = BlendMode.Overlay
// blendMode = BlendMode.Plus
// blendMode = BlendMode.Screen
// blendMode = BlendMode.Luminosity
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment