Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Version of Gradle Plugin: 3.1.0-alpha07
Version of Gradle: 4.4.1
Version of Java: 1.8.0_152-release-1024-b01 x86_64
OS: Mac OS X 10.13.2
Sketch version: 48.2 (47327)
Steps to Reproduce:
1. Create a radial gradient in Sketch (gradients.sketch is the Sketch file)
2. Export all as SVG (sketch_export.svg is this exported SVG) - Ignore the missing Sweep gradient, this is not supported in SVG so is expected behaviour
3. This is rendered correctly in Chrome (chrome_preview.png is a screen capture of this rendering in Chrome)
4. Import to Android Studio using the Vector Asset Tool (vector_drawable.xml is the imported VectorDrawable)
5. The radial gradient is not rendered - it is just a flat colour (android_studio_preview.png is a screen capture of the preview panel, but the same rendering is observed on a real device)
The issue appears to be related to the gradientTransform matrix for the radial gradient in the SVG file:
<radialGradient id="sketch_export-b" fx="50%" fy="50%" gradientTransform="matrix(0 1 -1.04241 0 1.021 0)">
From studying the SVG specification (
However, given that Chrome appears to handle it correctly it would suggest that either there is an issue with how the Vector Asset Tool handles this, or that Chrome has included a work-around if there is a Sketch export issue.