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

The path bounding box should not include curve points #282

Open
yisibl opened this issue Dec 17, 2023 · 3 comments
Open

The path bounding box should not include curve points #282

yisibl opened this issue Dec 17, 2023 · 3 comments

Comments

@yisibl
Copy link
Member

yisibl commented Dec 17, 2023

Spec: https://svgwg.org/svg2-draft/coords.html#BoundingBoxes
image

resvg-js now calculates the same result as the Figure 3 result, which is wrong, this bug is also reported in upstream resvg issue #687

image

Test case

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="380px" height="120px" viewBox="0 0 380 120">
  <title>Bounding Box of a Path</title>
    <g>
      <path stroke-width="2" fill="rgb(173, 216, 230)" stroke="none" fill-rule="evenodd" d="M20,50                L35,100                H120                V50                Q70,10 20,50" />
    </g>
</svg>
@RazrFalcon
Copy link

My bad. This is working fine. I was meant to reopen linebender/resvg#549

@yisibl
Copy link
Member Author

yisibl commented Dec 20, 2023

Nice, we can fix it the next time we synchronize resvg.

@RazrFalcon
Copy link

Good point.

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

2 participants