Last active
November 7, 2017 09:09
-
-
Save Krishan14sharma/8601824e56bfc28b88ffffc0c1999d80 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
val X_PARTITION_RATIO = 1 / 3f | |
val Y_PARTITION_RATIO = 1 / 3f | |
... | |
private fun drawVerticalLines(canvas: Canvas) { | |
canvas.drawLine(width * X_PARTITION_RATIO, 0f, width * X_PARTITION_RATIO, height.toFloat(), paint) | |
canvas.drawLine(width * (2 * X_PARTITION_RATIO), 0f, width * (2 * X_PARTITION_RATIO), height.toFloat(), paint) | |
} | |
private fun drawHorizontalLines(canvas: Canvas) { | |
canvas.drawLine(0f, height * Y_PARTITION_RATIO, width.toFloat(), height * Y_PARTITION_RATIO, paint) | |
canvas.drawLine(0f, height * (2 * Y_PARTITION_RATIO), width.toFloat(), height * (2 * Y_PARTITION_RATIO), paint) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment