TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SVG Path Strings

72 pointsby 1wheelabout 10 years ago

3 comments

jessedhillonabout 10 years ago
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 未加载
jameshartabout 10 years ago
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 未加载
Uehrekaabout 10 years ago
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 未加载