File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
extendedspans/src/main/kotlin/me/saket/extendedspans Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import androidx.compose.ui.geometry.CornerRadius
44import androidx.compose.ui.geometry.RoundRect
55import androidx.compose.ui.graphics.Color
66import androidx.compose.ui.graphics.Path
7+ import androidx.compose.ui.graphics.asAndroidPath
78import androidx.compose.ui.graphics.drawscope.Fill
89import androidx.compose.ui.graphics.drawscope.Stroke
910import androidx.compose.ui.graphics.isUnspecified
@@ -62,7 +63,7 @@ class RoundedCornerSpanPainter(
6263 flattenForFullParagraphs = true
6364 )
6465 boxes.forEachIndexed { index, box ->
65- path.reset ()
66+ path.asAndroidPath().rewind ()
6667 path.addRoundRect(
6768 RoundRect (
6869 rect = box.copy(
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import androidx.compose.ui.graphics.Path
1919import androidx.compose.ui.graphics.PathEffect
2020import androidx.compose.ui.graphics.StrokeCap
2121import androidx.compose.ui.graphics.StrokeJoin
22+ import androidx.compose.ui.graphics.asAndroidPath
2223import androidx.compose.ui.graphics.drawscope.Stroke
2324import androidx.compose.ui.graphics.isSpecified
2425import androidx.compose.ui.text.AnnotatedString
@@ -111,7 +112,7 @@ class SquigglyUnderlineSpanPainter(
111112 )
112113 val textColor = annotation.item.deserializeToColor() ? : layoutResult.layoutInput.style.color
113114 boxes.fastForEach { box ->
114- path.reset ()
115+ path.asAndroidPath().rewind ()
115116 path.buildSquigglesFor(box, density = this )
116117 drawPath(
117118 path = path,
You can’t perform that action at this time.
0 commit comments