Skip to content

Commit 4ed08e8

Browse files
add TouchRegion and HandlePlacement
1 parent ed88a47 commit 4ed08e8

File tree

1 file changed

+24
-0
lines changed
  • image/src/main/java/com/smarttoolfactory/image/transform

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.smarttoolfactory.image.transform
2+
3+
/**
4+
* Enum for detecting which section of Composable user has initially touched
5+
*/
6+
enum class TouchRegion {
7+
// Corners
8+
TopLeft, TopRight, BottomLeft, BottomRight,
9+
// Center of each side
10+
CenterLeft, CenterRight, TopCenter, BottomCenter,
11+
// Touch is inside or outside of Composable
12+
Inside, None
13+
}
14+
15+
/**
16+
* Enum class for placing handles for transform operations.
17+
* * [HandlePlacement.Corner] places handles
18+
* top left, top right, bottom left, and bottom right corners
19+
* * [HandlePlacement.Side] places handles center of left, right, top and bottom sides
20+
* * [HandlePlacement.All] places handles both corners and centers of each sides
21+
*/
22+
enum class HandlePlacement {
23+
Corner, Side, All
24+
}

0 commit comments

Comments
 (0)