Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8199675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:13:09+00:00 2026-06-07T06:13:09+00:00

The SVGPath.getBBox() implementation in at least WebKit seems somewhat shoddy; is there some better

  • 0

The SVGPath.getBBox() implementation in at least WebKit seems somewhat shoddy; is there some better (cheaper) way than walking the path (or sampling it over and over at random), manually computing its probable bounding box, to get a good reading?

http://bl.ocks.org/2939938 (or https://gist.github.com/2939938) shows an example of the latter and when I run it in a few different fairly modern browsers, there is notable variation in the native implementation. Opera is best, Firefox good and Chrome / Safari ocular-notably bad:

616.1572 677.0540 127.6856 126.8793 - sampled, gathering random coords for 5s (reference)
616.1569 677.0538 127.6860 126.8796 - opera 11.64 build 1403
616.1563 677.0547 127.6875 126.8789 - firefox aurora 15.0a2 (2012-06-15)
614.2805 673.9761 136.2089 129.9573 - chrome canary 21.0.1176.0
614.2805 673.9761 136.2089 129.9573 - safari 5.1.7 (7534.57.2)

Or, left/top/width/height variation from the reference bounding box in percent:

0.00005% 0.00003% 0.00031% 0.00024% - opera
0.00015% 0.00010% 0.00149% 0.00032% - firefox
0.30458% 0.45460% 6.67522% 2.42593% - chrome
0.30458% 0.45460% 6.67522% 2.42593% - safari
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:13:10+00:00Added an answer on June 7, 2026 at 6:13 am

    It turns out Raphael.js implements a rather excellent Raphael.pathBBox, for the case where you have a <path> element specifically; it seems algebraically exact, and is fast. Added to the comparison test page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to get at the actual data of a CGPath, so
Is there a equivalent in svg path to logo's turtlegraphics? instead of the hardcoded
I'm reading an svg/xml with XmlTextReader and I want to write just some of
How can I install a service under a different account than the LocalSystem account
I've draw a svg path using the great Jquery.SVG (the documentation could be better)
I'll be using PHP to parse a SVG-file and I've done some tests with
I've created my repository this way: sudo svnadmin create /svn After restarting apache i
Is there a command to move the whole SVG path to a new position,
I'm aware of this question: how do you animate an svgpath . And the
I'm creating an SVG path using the Raphael library and the following code: this.resultsBoxLine1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.