Open sai1153 opened 1 year ago
Same here
Try adding clipToBounds to your modifier DrawBox modifier:
Box(
modifier = Modifier
.padding(top = 8.dp)
.fillMaxSize(0.75f)
.border(width = 1.dp, color = Color.DarkGray)
) {
DrawBox(drawController = controller, modifier = Modifier.fillMaxSize().**clipToBounds()** ....)
}
Try adding clipToBounds to your modifier DrawBox modifier:
Box( modifier = Modifier .padding(top = 8.dp) .fillMaxSize(0.75f) .border(width = 1.dp, color = Color.DarkGray) ) { DrawBox(drawController = controller, modifier = Modifier.fillMaxSize().**clipToBounds()** ....) }
Awesome. Thanks
i think it can be avoided by adding a if condition in updateLatestPath(newPoint) function which checks whether the point lies inside the given modifier, if it lies inside then only add the newPoint