TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

SVG Path Strings

72 点作者 1wheel超过 10 年前

3 条评论

jessedhillon超过 10 年前
I have never understood why, when it comes to the &lt;path&gt; element, the entire definition of the path is shoved into one plain text attribute with its own specification language. Why couldn&#x27;t there have been special nodes like &lt;curve&gt; &lt;move&gt; etc so that the path can be processed using standard DOM traversal? As it is, anyone using paths in a programmatic way will invariably end up writing error-prone parsing and composing logic to modify the `d` attribute.<p>What am I missing? This seems like a major area for improvement.
评论 #9096631 未加载
评论 #9096755 未加载
jameshart超过 10 年前
Am I missing some sort of mathematical simplicity in the elliptical arc specification, because it looks like an absolute mess; surely there must be some mechanism that allows you to specify an elliptical arc between two points using tangent definitions, bezier-style. As it is, there&#x27;s a real mess there where rotating the end point around the start point, you have to rotate the elliptical axis in the opposite direction to maintain the same curve.<p>It looks like its one optimal scenario is in creating a rounded corner, which I guess is the common use case - but the unpredictability of how the curve changes if you move the end points without adjusting the corner radii seems to be a significant downside.
评论 #9097670 未加载
评论 #9099194 未加载
Uehreka超过 10 年前
I&#x27;m getting some real Baader-Meinhof here. I just started making SVG path animations at work and just checked them into mainline today.<p>I like the look of this tutorial, and I hope you make some more in-depth ones. Piling through W3C specs is no fun, and I could really use some good tutorials for when I need to get co-workers up to speed on SVG.
评论 #9097169 未加载