ElinamLLC / SharpVectors

SharpVectors - SVG# Reloaded: SVG DOM and Rendering in C# for the .Net.
https://elinamllc.github.io/SharpVectors/
BSD 3-Clause "New" or "Revised" License
713 stars 136 forks source link

Rendering issue with elements outside the canvas #267

Closed mirabyte closed 8 months ago

mirabyte commented 11 months ago

With the latest update from v1.8.1 to v1.8.2, there is a new issue with rendering SVG files (in WPF) when elements of the SVG are outside the canvas of the image. An example image is attached. When rendered in WPF, the origin of the elements is not set correctly, but reverts to 0|0, resulting in an incorrectly rendered image.

burst

paulushub commented 11 months ago

@mirabyte I have observed changed from due to "Ensure Viewbox Position" is affecting the rendering of this file. If that is the case and it is will not affect other images, then set the EnsureViewboxPosition property to false.

paulushub commented 9 months ago

@mirabyte I have now resolved this issue in the latest commit, please verify the result.

mirabyte commented 9 months ago

Looks good. We previously worked around by setting EnsureViewboxPosition to false as advised. So this is not needed any more and we can set back to the previous state. Thanks!