Skip to content

Instantly share code, notes, and snippets.

@IslamBesto
Last active July 8, 2020 10:30
Show Gist options
  • Save IslamBesto/e2522e251e4e464dd3f6e2d4ccf87f57 to your computer and use it in GitHub Desktop.
Save IslamBesto/e2522e251e4e464dd3f6e2d4ccf87f57 to your computer and use it in GitHub Desktop.
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
//point calculation
mPath.reset();
mPath.moveTo(0, 0);
mPath.lineTo(mFirstCurveStartPoint.x, mFirstCurveStartPoint.y);
mPath.cubicTo(mFirstCurveControlPoint1.x, mFirstCurveControlPoint1.y,
mFirstCurveControlPoint2.x, mFirstCurveControlPoint2.y,
mFirstCurveEndPoint.x, mFirstCurveEndPoint.y);
mPath.cubicTo(mSecondCurveControlPoint1.x, mSecondCurveControlPoint1.y,
mSecondCurveControlPoint2.x, mSecondCurveControlPoint2.y,
mSecondCurveEndPoint.x, mSecondCurveEndPoint.y);
mPath.lineTo(mNavigationBarWidth, 0);
mPath.lineTo(mNavigationBarWidth, mNavigationBarHeight);
mPath.lineTo(0, mNavigationBarHeight);
mPath.close();
}
@Soumyakantalt
Copy link

great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment