Skip to content

Instantly share code, notes, and snippets.

@tsuijten
Created May 9, 2019 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsuijten/fcd4dcb61bafc36e3ed431335d3e2f45 to your computer and use it in GitHub Desktop.
Save tsuijten/fcd4dcb61bafc36e3ed431335d3e2f45 to your computer and use it in GitHub Desktop.
@Composable
private fun DrawFillRect(brush: Brush) {
Draw { canvas, parentSize ->
val paint = Paint()
brush.applyBrush(paint)
canvas.drawRect(parentSize.toRect(), paint)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment