Last active
June 22, 2019 18:50
-
-
Save TayfunCesur/026dc1916866c27cbed0a21f9fdd8bd3 to your computer and use it in GitHub Desktop.
This file contains 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 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