Last active
September 18, 2019 09:38
-
-
Save CMyae/d6c10f6e6787a069250c8f523abaf8fb to your computer and use it in GitHub Desktop.
Code snippet for calculating connection points
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
private fun calculateConnectionPointsForBezierCurve() { | |
try { | |
for (i in 1 until points.size) { | |
conPoint1.add(PointF((points[i].x + points[i - 1].x) / 2, points[i - 1].y)) | |
conPoint2.add(PointF((points[i].x + points[i - 1].x) / 2, points[i].y)) | |
} | |
} catch (e: Exception) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment