Skip to content

Instantly share code, notes, and snippets.

@louis993546
Created June 17, 2019 14:49
Show Gist options
  • Save louis993546/c6bfd8e6b99b9095118524883648f651 to your computer and use it in GitHub Desktop.
Save louis993546/c6bfd8e6b99b9095118524883648f651 to your computer and use it in GitHub Desktop.
@Composable
internal fun Text(/* params */) {
/* a lot of magic */
val children = @Composable {
Draw { canvas, _ ->
internalSelection.value?.let { renderParagraph.paintSelection(canvas, it) }
renderParagraph.paint(canvas, Offset(0.0f, 0.0f))
}
}
/* a lot more magic */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment