Skip to content

Commit 752c685

Browse files
authored
Update SVGACanvasDrawer.kt
remove Unnecessary pathEffect when drawpath.
1 parent 651b4da commit 752c685

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
@@ -320,7 +320,7 @@ class SVGACanvasDrawer(videoItem: SVGAVideoEntity, val dynamicItem: SVGADynamicE
320320
sharedPaint.strokeMiter = it.toFloat() * requestScale()
321321
}
322322
shape.styles?.lineDash?.let {
323-
if (it.size == 3) {
323+
if (it.size == 3 && it[0] > 0 && it[1] > 0) {
324324
sharedPaint.pathEffect = DashPathEffect(floatArrayOf(
325325
(if (it[0] < 1.0f) 1.0f else it[0]) * requestScale(),
326326
(if (it[1] < 0.1f) 0.1f else it[1]) * requestScale()

0 commit comments

Comments
 (0)