fix: fix the problem that Black background when converting SVG to PNG#41
fix: fix the problem that Black background when converting SVG to PNG#41starichat wants to merge 3 commits intosrwiley:masterfrom
Conversation
|
stari, can you please check if pull request #40, Support top level style solves this problem? I just merged it today into the main branch. |
|
@srwiley asked for my input in #40, so I'm giving it: I don't know a lot about svg gradients, so I can't say for sure that this solution is good. However, the implementation seems plausible to me. Parsing the contents of style tags within a gradient to obtain gradient related information sounds good. I am a bit confused about the chinese comments in the tests though. Since the rest of the project is in english, these should probably be translated. Apart from that, the PR looks good to me. |
|
Sorry, I submitted some Chinese comments into the code, accidentally. I've just removed the comment. Thanks! |
|
Sorry for taking so long to get back. I've been busy elsewhere. I can't accept this pull request as is. The main problem is that in order fix the GradStop bug you have rearranged 8 files. This makes it hard for me to see exactly what you changed because such larger blocks have been moved around. In addition, generated pngs should not be included with source code. Also, I can't see where the fix alters the output from the last merge in the example svgs. You also add the style function to the draw function maps twice, which is unnecessary. I am sure there is something good here, but please do the minimal alterations to the the existing structure, such as do not split out functions into individual files. |
When I parse a
styleattribute with a globalstyletag and astoptag in a Graid component, I will encounter the problem of the above attribute parsing failure,and resulted in the problem that Black background when converting SVG to PNG. I would classify it as the parsing problem of the style attribute, so I submitted this PR to solve the above problem.