From b71d16381bbac8b6d4500c642e1a440269a29b98 Mon Sep 17 00:00:00 2001 From: spvessel Date: Mon, 14 Sep 2020 11:38:08 +0300 Subject: [PATCH] Added/removed some imports. --- .../kotlin/example/imageviewer/view/FullImageScreen.kt | 4 ++-- .../androidMain/kotlin/example/imageviewer/view/MainScreen.kt | 1 - .../kotlin/example/imageviewer/view/FullImageScreen.kt | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/FullImageScreen.kt b/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/FullImageScreen.kt index 4bc91d2e27..7121afb19f 100755 --- a/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/FullImageScreen.kt +++ b/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/FullImageScreen.kt @@ -15,9 +15,9 @@ */ package example.imageviewer.view -import android.content.Context import android.content.res.Configuration -import android.graphics.* +import android.graphics.Bitmap +import android.graphics.Rect import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier diff --git a/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/MainScreen.kt b/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/MainScreen.kt index bb0fcccf4f..9a6c39b64d 100755 --- a/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/MainScreen.kt +++ b/examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/MainScreen.kt @@ -15,7 +15,6 @@ */ package example.imageviewer.view -import android.content.Context import android.content.res.Configuration import androidx.compose.foundation.clickable import androidx.compose.foundation.shape.CircleShape diff --git a/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt b/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt index 417ea57ee8..48ddb63670 100755 --- a/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt +++ b/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt @@ -203,8 +203,9 @@ fun setImage(content: ContentState) { ) { Draggable(onDrag = drag, modifier = Modifier.fillMaxSize()) { Scalable(onScale = scale, modifier = Modifier.fillMaxSize()) { + val bitmap = imageByGesture(content, scale, drag) Image( - asset = imageByGesture(content, scale, drag).asImageAsset(), + asset = bitmap.asImageAsset(), contentScale = ContentScale.Fit ) }