Skip to content

Instantly share code, notes, and snippets.

@TayfunCesur
Last active June 22, 2019 18:50
Show Gist options
  • Save TayfunCesur/026dc1916866c27cbed0a21f9fdd8bd3 to your computer and use it in GitHub Desktop.
Save TayfunCesur/026dc1916866c27cbed0a21f9fdd8bd3 to your computer and use it in GitHub Desktop.
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
//...
mPath.apply {
//1.Step
moveTo(
mCurveStartPoint.x.toFloat(),
mCurveStartPoint.y.toFloat()
)
//2.Step
cubicTo(
mControlPoint1.x.toFloat(), mControlPoint1.y.toFloat(),
mControlPoint2.x.toFloat(), mControlPoint2.y.toFloat(),
mCurveEndPoint.x.toFloat(), mCurveEndPoint.y.toFloat()
)
//3.Step
lineTo(mWidth.toFloat(), mHeight.toFloat())
//4.Step
lineTo(0f, mHeight.toFloat())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment