PathAttribute: path

Description Available Attribute Values Path-Data Details Animatable Used by the Elements

Description

Governs the path of the animated motion.

Available Attribute Values

The value is a path-data description and is expressed in either one of the following ways.

<path-data-list>

Specifies the path of motion as a named list, using the path-data format with list names drawn from the path commands (M, m, Z, z, L, l, H, h, V, v) and values being the points for which those commands are to operate on.

<path-data-vector>

Specifies the path of the motion as a vector; using the path-data format built from path commands (M, m, Z, z, L, l, H, h, V, v) and values being the points for which those commands are to operate on.

Path-Data Details

Path-data is a description consisting of a collection of pairs of path commands and values. Path-data is be represented in one of two ways, either as an named list or as a vector. In the named list representation, the names are letters-tokens for commands and the corresponding values play the role of the parameters for those commands. list(M=c(100,100), L=c(200,200), h=10, Z=NULL) In the vector representation, each name is a letter-token (of class character) followed by the corresponding values, again playing the role of the parameters for those commands. c('M', c(100,100), 'L', c(200,200), 'h', 10, 'Z') In the following we write pt for a point c(x,y).

Path Data Command Table

Name Values Interpetion
'M','m' pt+ Move the current point to a new location (without drawing)
'L','l' pt+ Draw a line from the current point to pt
'H','h' (x)+ Draw a horizontal line from the current point
'V','v' (y)+ Draw a vertical line from the current
'C','c' c(pt1,pt2,pt)+ Draw a cubic Bezier curve to pt with control points pt1,pt2, (x2,y2)
'S','s' c(pt2,pt))+ Draw a cubic Bezier to pt using pt2 as the second control pt (inheriting the first control point from a preceding Bezier)
'Q','q' c(pt1,pt))+ Draw a quadratic Bezier to pt using pt1 as the control pt
'T','t' pt+ Draw a quadratic Bezier curve to pt (inheriting the control from a preceding Bezier)
'A','a' c(rxy, theta, LargeArc, SweepRight, pt) Draw an arc the current point to the point pt, based on an ellipse of radii rxy, rotated by θ degrees.
Use 1 or 0 for TRUE or FALSE in the LargeArc, SweepRigh flags
'Z','z' Closes the Path

Note:

Animatable

Not Animatable

Used by the Elements

Animation Elements

animateMotion


mslegrand/svgR documentation built on Jan. 21, 2020, 2:59 p.m.