Skip to content

Instantly share code, notes, and snippets.

@V-Abhilash-1999
Created May 23, 2023 12:26
Show Gist options
  • Save V-Abhilash-1999/15051fe5f76157f133401cdf269c1f23 to your computer and use it in GitHub Desktop.
Save V-Abhilash-1999/15051fe5f76157f133401cdf269c1f23 to your computer and use it in GitHub Desktop.
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