Browse Source

Added/removed some imports.

pull/4/head
spvessel 4 years ago
parent
commit
b71d16381b
  1. 4
      examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/FullImageScreen.kt
  2. 1
      examples/imageviewer/common/src/androidMain/kotlin/example/imageviewer/view/MainScreen.kt
  3. 3
      examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt

4
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

1
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

3
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
)
}

Loading…
Cancel
Save