https://kotlinlang.org logo
#compose
Title
# compose
t

Tin Tran

11/08/2023, 3:23 AM
I have a list of points and I’m using this to draw them like this but the line seems broken to small pieces. How to make them draw like a single line?
Copy code
drawPoints(
   points,
   PointMode.Polygon,
   strokeWidth = strokeWidth,
   color = strokeColor
)
r

romainguy

11/08/2023, 5:50 AM
You should use a Path, not drawPoints to do what you want
The polygon here is drawn as connected lines which isn't the same as a single contour
Check out drawPath()
t

Tin Tran

11/08/2023, 6:07 AM
Thank you!
j

Jonathan

11/08/2023, 1:57 PM
@romainguy What’s the performance of extremely long paths?