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

你可能感兴趣的:(Path)