svg2android icon indicating copy to clipboard operation
svg2android copied to clipboard

Implemented linear and radial gradients for fill and stroke colors.

Open winsock opened this issue 8 years ago • 5 comments

I have not tested this extensively. It was a quick hack of the code so I didn't have to manually import all of the SVGs with gradients into Android Studio. For the 41 SVGs I tested it with it worked properly. One outstanding issue is that I didn't bother with making sure indentation worked properly.

winsock avatar Nov 01 '17 21:11 winsock

It looks OK but It does not work correctly on this - could you please check It? Also when I try to build the project It shows me error:

Error while processing C:\Users\Yuraj\Repos\Experiments2\app\src\main\res\drawable\aa.xml : Start point cannot equalendpoint

problematic_drawing.zip

yuraj11 avatar Nov 06 '17 10:11 yuraj11

@winsock Could you please check my SVG and try convert with your changes? Because It does not correctly generates <gradient block

yuraj11 avatar Feb 23 '18 15:02 yuraj11

@winsock thank you for your work. Could you please finish it? @yuraj11 in case @winsock is unable to continue, could you please finish his work? This feature is really important.

ddobrev avatar May 31 '18 00:05 ddobrev

@yuraj11 @ddobrev I apologize for the really late response for addressing these issues. I have been slammed at work with a project leaving almost no free time.

Your test SVG now renders properly. Apparently there were a couple of issues, substituteUseRef wasn't copying children and Inkscape was using style attributes for stop-color and opacity unlike Adobe Illustrator setting those as their own attributes.

winsock avatar May 31 '18 17:05 winsock

Just rebased and squashed as well to make this merge cleaner

winsock avatar May 31 '18 18:05 winsock