Closed ninyess closed 1 year ago
@Composable fun ImageCropper( modifier: Modifier = Modifier, imageBitmap: ImageBitmap, contentDescription: String?, cropStyle: CropStyle = CropDefaults.style(), cropProperties: CropProperties, filterQuality: FilterQuality = DrawScope.DefaultFilterQuality, crop: Boolean = false, backgroundColor: Color = Color.Black, onCropStart: () -> Unit, onCropSuccess: (ImageBitmap) -> Unit ) { .. val transparentColor by animateColorAsState( animationSpec = tween(300, easing = LinearEasing), targetValue = if (isTouched.value) backgroundColor.copy(alpha = .5f) else backgroundColor.copy(alpha = .7f) ) .. ImageCropper( modifier = imageModifier, visible = visible, imageBitmap = imageBitmap, containerWidth = containerWidth, containerHeight = containerHeight, imageWidthPx = imageWidthPx, imageHeightPx = imageHeightPx, handleSize = cropProperties.handleSize, overlayRect = cropState.overlayRect, cropType = cropType, cropOutline = cropOutline, cropStyle = cropStyle, transparentColor = transparentColor, backgroundColor = backgroundColor ) .. }
Thank you :)
Thanks for the suggestion. I will add colors to theme folder and use them instead of creating new Color instance on each touch change.
Regardless of my suggestion, VERY thank you very much for this project.
Thank you :)