Closed BiancaTud closed 2 years ago
The main problem here is that you have an error in your SVG file. You have two elements with id="#clip-2"
. One is a <rect>
and one is a <clipPath>
.
My code was dereferencing the first match - the rectangle. Unfortunately I wasn't properly handling the case where the element the clip-path
references is not a <clipPath>
. The spec says if that happens, no clip should be applied to the element. I was just failing and not rendering the element at all. That is now fixed.
This fix will be in release version 1.5.
Describe the bug Some svg files are not rendered correctly on android devices using coil library (v2.0.0 and v2.1.0). Same svg files render fine on iOS and browsers The error thrown is
java.lang.ClassCastException: com.caverock.androidsvg.SVG$Rect cannot be cast to com.caverock.androidsvg.SVG$ClipPath
Expected behavior SVG loads correctly
Stack traces
SVG