Skip to content

Commit a9b85c4

Browse files
authored
Update SVGACanvasDrawer.kt
fix DashPathEffect
1 parent 7ff2487 commit a9b85c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/opensource/svgaplayer/SVGACanvasDrawer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class SVGACanvasDrawer(videoItem: SVGAVideoEntity, val dynamicItem: SVGADynamicE
227227
sharedPaint.strokeMiter = it.toFloat() * scale
228228
}
229229
shape.styles?.lineDash?.let {
230-
if (it.size == 3 && it[0] > 0 && it[1] > 0) {
230+
if (it.size == 3 && (it[0] > 0 || it[1] > 0)) {
231231
sharedPaint.pathEffect = DashPathEffect(floatArrayOf(
232232
(if (it[0] < 1.0f) 1.0f else it[0]) * scale,
233233
(if (it[1] < 0.1f) 0.1f else it[1]) * scale

0 commit comments

Comments
 (0)