how to change crop zone from code?

#41 · closed · 2 comments

View on GitHub ↗

asenanov7

I'm using Slider from 0 to 100, and wanted to be able to give the user the ability to adjust the cropping area using it

Comments

SmartToolFactory

You can change overlayRatio like this ``` var value by remember { mutableStateOf(0f) } val cropProperties by remember(value) { mutableStateOf( CropDefaults.properties( cropOutlineProperty = CropOutlineProperty( OutlineType.Rect, RectCropShape(0, "Rect") ), handleSize = handleSize, overlayRatio = value ) ) } ``` But as you mentioned on stackoverflow it will play animation. I can add a flag to disable that animation after changing overlay in the futurer

asenanov7

can you please ping me when you release a new version