Skip to content

Commit

Permalink
Revert "[DrawablePainter] Fix overwriting bounds of drawable when dra…
Browse files Browse the repository at this point in the history
…wing it via DrawablePainter"
  • Loading branch information
andkulikov committed Oct 11, 2022
1 parent 2fad8c2 commit 397c05f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 158 deletions.
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

0 comments on commit 397c05f

Please sign in to comment.