Created
April 6, 2017 17:03
-
-
Save bigstark/cc98167e2f05aee50277479cd7b097a1 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 | |
protected void onDraw(Canvas canvas) { | |
super.onDraw(canvas); | |
int width = getWidth(); | |
int height = getHeight(); | |
// o ㅡㅡ o | |
// | |
// | |
// o o | |
resetPaint(0); | |
float[] circleCenter = getHorizontalCenter(width, height, true); | |
canvas.drawCircle(circleCenter[0], circleCenter[1], radius, paint); | |
// o o | |
// | | |
// | | |
// o o | |
resetPaint(1); | |
circleCenter = getVerticalCenter(width, height, true); | |
canvas.drawCircle(circleCenter[0], circleCenter[1], radius, paint); | |
// o o | |
// | |
// | |
// o ㅡㅡ o | |
resetPaint(2); | |
circleCenter = getHorizontalCenter(width, height, false); | |
canvas.drawCircle(circleCenter[0], circleCenter[1], radius, paint); | |
// o o | |
// ㅣ | |
// ㅣ | |
// o o | |
resetPaint(3); | |
circleCenter = getVerticalCenter(width, height, false); | |
canvas.drawCircle(circleCenter[0], circleCenter[1], radius, paint); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment