Skip to content

Instantly share code, notes, and snippets.

@CMyae
Last active September 18, 2019 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CMyae/94fc0a18a20e018b849feea645f62e11 to your computer and use it in GitHub Desktop.
Save CMyae/94fc0a18a20e018b849feea645f62e11 to your computer and use it in GitHub Desktop.
Draw fill bezier curve
override fun onDraw(canvas: Canvas?) {
super.onDraw(canvas)
try {
...
borderPath.set(path)
path.lineTo(width.toFloat(), height.toFloat())
path.lineTo(0f, height.toFloat())
canvas?.drawPath(path, pathPaint)
canvas?.drawPath(borderPath, borderPathPaint)
} catch (e: Exception) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment