Skip to content
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

Some file can not de displayed correctly. #1052

Open
shue-2000 opened this issue Apr 29, 2023 · 7 comments
Open

Some file can not de displayed correctly. #1052

shue-2000 opened this issue Apr 29, 2023 · 7 comments

Comments

@shue-2000
Copy link

shue-2000 commented Apr 29, 2023

The following file can not de displayed correctly.

https://commons.wikimedia.org/wiki/File:Simplicial_complex_example.svg
<svg width="532" height="517" xmlns="http://www.w3.org/2000/svg"> <g fill="#97ccc8" stroke="#000" stroke-width="2"> <path d="M161 239l-82.5 271 205-59-122.5-212zM499 204l-127.5 34 53 125 74.5-159z"/> <path d="m243.5 130.5l-83 110 211.5-1.5-128.5-108.5z"/> <path d="M387.5 81.5l-144 49 128.5 108.5 15.5-157.5zM158 11.5l-149.5 149.5 134.5 7.5 15-157z"/> <path d="m161 239l-153 149.5 70.5 121.5 82.5-271z" fill="#77bcac"/> </g> <g stroke="#000" stroke-width="2" fill="none"> <path d="M158.5 9l95 15M424.5 362.5s-45 86.5-45 86.5l96 30-51-116.5zM474 28.5s49.5 75.5 49.5 75.5l-25.5 100.5"/> <path d="m8.5 388.5s275 62.5 275 62.5" stroke-dasharray="16 16"/> </g> <path d="M283 450h0M9 388h0M79 509h0M161.5 237h0M243 131h0M387.5 82h0M8.5 161h0M143 169h0M157.5 8.5h0M255.5 24h0M371.5 238h0M31 260h0M424 362h0M378.5 449h0M475.5 479.5h0M473 26.5h0M523.5 104.5h0M498 205h0" stroke-width="17" stroke="#000" stroke-linecap="round"/> </svg>

It seems like the last path part was not rendered.
renered with library
the following was the image which rendered correctly.
Simplicial_complex_example svg

@mzh3511
Copy link
Contributor

mzh3511 commented May 10, 2023

This may be also because of the missing _style, see PR #1053

From the following screenshot of my demo application, you can see it is the same as your expected, you can try that change
example

@shue-2000
Copy link
Author

@mzh3511
Thank you very much for your advice. However, the results did not change with the latest version.
Have I missed something?

@mrbean-bremen
Copy link
Member

Do you mean the main branch by "latest version", or the latest nuget version? A version with that change has not yet been released.

@shue-2000
Copy link
Author

@mzh3511
Thank you for helping.
I then downloaded the source code and confirmed that the #1053 patch had been applied. However, it appears that nothing has been changed.
workspace

@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 13, 2023

I can confirm that in the current main version the problem is not fixed.
@mzh3511 - maybe you had changed something else in your code? Or ran it in another environment?

@mzh3511
Copy link
Contributor

mzh3511 commented May 18, 2023

@mrbean-bremen I got the difference between us, I use the SvgNet code through the wieslawsoltes/Svg.Skia, not directly get the GDI+ bitmap by SvgDocument.Draw method

This means the SvgDocument data is correct, but drawing to bitmap may have some issues, you can debug it by SVG\Samples\SVGViewer\SVGViewer.csproj

@mrbean-bremen
Copy link
Member

Ok, that clarifies it. For me it looks like the used GDI++ functions just do not support the needed functionality, and Svg.Skia has of course its own drawing implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants