Last active
September 18, 2019 09:37
-
-
Save CMyae/94fc0a18a20e018b849feea645f62e11 to your computer and use it in GitHub Desktop.
Draw fill bezier curve
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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