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

Zero "0" stroke width objects cannot be handled correctly in SVGGraphics2D, a default value of stroke-width:0.1 in svg export will be returned #61

Open
istinnstudio opened this issue Nov 29, 2024 · 0 comments

Comments

@istinnstudio
Copy link

istinnstudio commented Nov 29, 2024

Hi.., in a loop of shapes if I use "Stroke randomStroke = new BasicStroke(randomStrokeWidth); " if width will be set to zero, at the end I get stroked shapes with a rendered default width 0.1f. Instead it should export "no stroke". Batik exports ok the same graphics2D object, without rendering the stroke by setting: stroke-width:0.

SVGGraphics2D source constructor this.zeroStrokeWidth = 0.1; and at the end we get stroke-width:0.1 with all zero width objects

So In this case, I could set my minimum width to something like near zero .. 0.000001f and svg export is ok, as a workaround. But zero should be handled, maybe should be clearer if just use 0f instead of 0.1f in the constructor default value.
Thanks

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

1 participant