SVG PATH d參數的 ace


SVG PATH 的d參數較多,也比較復雜。

  • Moveto
  • Lineto 
  • Curveto
  • Arcto
  • ClosePath

這里只打算記錄下 Arcto 參數.(https://developer.mozilla.org/en-US/docs/SVG/Attribute/d

Sometimes it is easier to describe a path as an elliptical curve rather than a Bezier curve. To this end, Arcto commands are supported in paths. The center of the arc is calculated from the other variables. The declaration of an arcto is relatively complicated: "A rx,ry xAxisRotate LargeArcFlag,SweepFlag x,y". To deconstruct, rx and ry are the radius in the x and y directions respectively,  The LargeArcFag has a value of either 0 or 1, and determines whether the smallest (0) or largest (1) arc possible is drawn. The SweepFlag is either 0 or 1, and determines if the arc should be swept in a clockwise (1) or anti-clockwise (0) direction. x and y are the destination coordinates. Although the xAxisRotate is supposed to change the x-axis relative to the current reference frame, it seems that this argument has no effect with Gecko 7.

文字描述是挺難懂的,可以查看這個演示文件。http://jun-lu.github.com/lujun/svg/path.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM