GlyphElementDAttribute: d

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

Description

Sets the path-data points used to create a glyph outline.

Available Attribute Values

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

<path-data-vector>

Specifies the outline of the glyph path as a vector, built from both path commands (M, m, Z, z, L, l, H, h, V, v) and the points those commands are to operate on.

<path-data-list>

Specifies the outline of the glyph path as a named list, with names originating from the path commands: M, m, Z, z, L, l, H, h, V, v.

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

Non-structural Container Elements

glyph, missing.glyph


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