Skip to content
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

Revert "[DrawablePainter] Fix overwriting bounds of drawable when drawing it via DrawablePainter" #1368

Merged
merged 1 commit into from Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 0 additions & 26 deletions drawablepainter/build.gradle
Expand Up @@ -66,32 +66,6 @@ android {
dependencies {
implementation libs.compose.ui.ui
implementation libs.kotlin.coroutines.android

// ======================
// Test dependencies
// ======================

androidTestImplementation libs.compose.foundation.foundation

androidTestImplementation project(':internal-testutils')
testImplementation project(':internal-testutils')

androidTestImplementation libs.junit
testImplementation libs.junit

androidTestImplementation libs.truth
testImplementation libs.truth

androidTestImplementation libs.compose.ui.test.junit4
testImplementation libs.compose.ui.test.junit4

androidTestImplementation libs.compose.ui.test.manifest
testImplementation libs.compose.ui.test.manifest

androidTestImplementation libs.androidx.test.runner
testImplementation libs.androidx.test.runner

testImplementation libs.robolectric
}

apply plugin: "com.vanniktech.maven.publish"

This file was deleted.

This file was deleted.

Expand Up @@ -130,10 +130,8 @@ class DrawablePainter(
// Reading this ensures that we invalidate when invalidateDrawable() is called
drawInvalidateTick

// Update the Drawable's bounds if necessary
if (drawable.bounds.isEmpty) {
drawable.setBounds(0, 0, size.width.roundToInt(), size.height.roundToInt())
}
// Update the Drawable's bounds
drawable.setBounds(0, 0, size.width.roundToInt(), size.height.roundToInt())

canvas.withSave {
drawable.draw(canvas.nativeCanvas)
Expand Down