使用javascript计算贝塞尔曲线的长度
我使用 Keith Wood 的 jQuery SVG 插件沿着路径绘制文本。 JS如何获取路径的长度?
I draw a text along a path with Keith Wood's jQuery SVG plugin. How can I get a length of the path with JS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 SVG 规范,使用 path.getTotalLength()。
以下是如何将其与 jquery-svg 库一起使用的最小示例:
From the SVG specification, use path.getTotalLength().
Here's a minimal example of how to use this with the jquery-svg library: