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

getBBox is not calculated correctly #112

Open
yisibl opened this issue May 17, 2022 · 3 comments
Open

getBBox is not calculated correctly #112

yisibl opened this issue May 17, 2022 · 3 comments

Comments

@yisibl
Copy link
Owner

yisibl commented May 17, 2022

<svg id="svg-root" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
    <defs>
        <marker id="testMarker">
            <rect width="96" height="96" fill="blue" />
        </marker>
    </defs>
    <path d="m 0 0 L 0 0" stroke-width="25" marker-end="url(#testMarker)" />
    <line x1="0" x2="0" y1="100" y2="100" stroke-width="25" marker-end="url(#testMarker)" />
  </g>
</svg>

getBBox

height: 2500
width: 2400

Expect to be consistent with innerBBox

height: 175
width: 75

This relies on the upstream resvg to resolve.

@zyq666
Copy link

zyq666 commented Jun 30, 2022

The getBBox method doesn't seem to exist in @resvg/resvg-js:2.0.1 in npm,
When are you planning to release it?
Thx

@yisibl
Copy link
Owner Author

yisibl commented Jul 1, 2022

@zyq666 Yes, getBBox is not yet released, and I expect to release a new version as soon as this weekend.

@yisibl
Copy link
Owner Author

yisibl commented Jul 3, 2022

@zyq666 The getBBox() API has been released in 2.1.0. https://github.com/yisibl/resvg-js/releases/tag/v2.1.0

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