File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
image/src/main/java/com/smarttoolfactory/image/zoom Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.smarttoolfactory.image.zoom
22
33import androidx.compose.runtime.Immutable
44import androidx.compose.ui.geometry.Offset
5+ import androidx.compose.ui.geometry.Rect
56
67/* *
78 * class that contains current zoom, pan and rotation information
@@ -12,3 +13,17 @@ data class ZoomData(
1213 val pan : Offset = Offset .Zero ,
1314 val rotation : Float = 0f
1415)
16+
17+
18+ /* *
19+ * Class that contains current zoom, pan and rotation, and rectangle of zoomed and panned area
20+ * information
21+ */
22+ @Immutable
23+ data class EnhancedZoomData (
24+ val zoom : Float = 1f ,
25+ val pan : Offset = Offset .Zero ,
26+ val rotation : Float = 0f ,
27+ val drawRect : Rect ,
28+ val cropRect : Rect
29+ )
Original file line number Diff line number Diff line change @@ -160,8 +160,8 @@ open class ZoomState internal constructor(
160160 initialRotation : Float = 0f ,
161161 minZoom : Float = 1f ,
162162 maxZoom : Float = 5f ,
163- private val zoomEnabled : Boolean = true ,
164- private val panEnabled : Boolean = true ,
163+ internal val zoomEnabled : Boolean = true ,
164+ internal val panEnabled : Boolean = true ,
165165 internal val rotationEnabled : Boolean = true ,
166166 internal val limitPan : Boolean = false
167167) {
You can’t perform that action at this time.
0 commit comments