Skip to content

Instantly share code, notes, and snippets.

@bitvale
Created January 7, 2019 07:54
Show Gist options
  • Save bitvale/3302463e9e6dab4f0cf1870e66882243 to your computer and use it in GitHub Desktop.
Save bitvale/3302463e9e6dab4f0cf1870e66882243 to your computer and use it in GitHub Desktop.
For Medium article "The power of Android Porter/Duff Mode"
override fun onDraw(canvas: Canvas ?) {
canvas?.withRotation(angle, lightPivotX, lightPivotY) {
drawPath(lightPath, lightPaint)
}
canvas?.drawBitmap(textBitmap, 0f, 0f, textPaint)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment