Created
May 23, 2023 12:26
-
-
Save V-Abhilash-1999/15051fe5f76157f133401cdf269c1f23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val interactionSource = remember { | |
MutableInteractionSource() | |
} | |
val scope = rememberCoroutineScope() | |
var sat: Float | |
var value: Float | |
val pressOffset = remember { | |
mutableStateOf(Offset.Zero) | |
} | |
Canvas( | |
modifier = Modifier | |
.size(300.dp) | |
.emitDragGesture(interactionSource) | |
.clip(RoundedCornerShape(12.dp)) | |
) { | |
val cornerRadius = 12.dp.toPx() | |
val satValSize = size | |
val bitmap = Bitmap.createBitmap(size.width.toInt(), size.height.toInt(), Bitmap.Config.ARGB_8888) | |
val canvas = Canvas(bitmap) | |
val satValPanel = RectF(0f, 0f, bitmap.width.toFloat(), bitmap.height.toFloat()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment