-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG renders solid black shapes #75
Comments
Another issue with that code is that some files make it hang when calling This is an example of such file I tried opening it in few other apps and loads nicely. What am I missing? Thanks! |
I had a look at what was going on. The problem is that your svg is relying on style sheet notation and SVG Salamander currently doesn't handle style sheets. It's something that has been on the back burner for a while - I'm not sure when I'll be able to implement it. If you can export your SVG without style sheets, it ought to work. |
Thanks, that works! |
Just stumbled across this thread because of the same issue. @blackears is style sheets the only feature of SVGs that is not supported or are there others I should be aware of as well? And is there any way workaround for when you don't have the ability to re-export the svg and must work with one that includes a style sheet? |
This implementation also does not support most of Javascript (I wrote a my own interpreter that can evaluate expressions, but that's all). It also does not support compositing layers or raster effects. There might be other omissions, but those are the ones I know of. You might be able to import your SVG into a program like Inkscape (or so,ething else that can import svg) and then reexport without a stylesheet. |
No matter what I do, all I get are black shapes.
Here's my code below. Due to the nature of my project, I need to embed the SVG file, so it's stored as byte array (data variable below).
to render it on my Graphics2D I use
svgDiagram.render(g2d);
Here's one of the files I tried loading, it loads as a solid black rectangle, but playing with alpha it's possible to see that all shapes are there, just black.
diylc.zip
The text was updated successfully, but these errors were encountered: