DEV Community

Discussion on: Drawing and painting in Jetpack Compose #1

Collapse
 
varshakulkarni profile image
Varsha Kulkarni • Edited

Got a workaround for this.

drawCircle(
  Color.Red, 64f,
  Offset(size.width / 2, size.height / 2),
  style = Stroke(width = 8f,
    pathEffect = DashPathEffect(floatArrayOf(10f, 10f), 0f)
  ),
)
Enter fullscreen mode Exit fullscreen mode

This has to be changed to this:

drawCircle(
  Color.Red, 64f,
  Offset(size.width / 2, size.height / 2),
  style = Stroke(width = 8f,
    pathEffect = PathEffect.dashPathEffect(floatArrayOf(10f, 10f), 0f)
  ),
)
Enter fullscreen mode Exit fullscreen mode