-
Notifications
You must be signed in to change notification settings - Fork 274
Sample showing how to take a screenshot from a composable #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…into draw-into-bitmap
…142) * Add image in the shared storage instead of relying on a FileProvider * Add comment * Apply Spotless --------- Co-authored-by: yrezgui <yrezgui@users.noreply.github.com>
...ose/snippets/src/main/java/com/example/compose/snippets/graphics/AdvancedGraphicsSnippets.kt
Outdated
Show resolved
Hide resolved
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! One small comment.
|
||
onDrawWithContent { | ||
val pictureCanvas = | ||
androidx.compose.ui.graphics.Canvas( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there a whole package definition needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we need to use two different kinds of canvas' in the snippet, I'll import the other one too so its clearer in the snippets.
Adding a sample that shows how to draw a composable into a bitmap, using
Picture
anddrawIntoCanvas
.