vwPath: Functions to render variable-width line

View source: R/render.R

vwPathR Documentation

Functions to render variable-width line

Description

Functions that can be used to render a variable-width line. All variable-width-line functions generate a polygon or path to represent the variable-width line and they have a render argument that specifies the rendering function. These two functions provide the default rendering behaviour.

Usage

vwPath(rule = "winding")
vwPolygon(x, y, id.lengths, gp, name)

Arguments

rule

The fill rule for rendering a variable-width line as a path.

x, y, id.lengths, gp, name

Arguments provided by the calling function when rendering occurs.

Details

These functions are not called directly; they are provided as arguments to variable-width-line functions (which then call them internally to render a variable-width line).

Value

These functions are used for their side-effect, which is to draw on the current graphics device.

Author(s)

Paul Murrel

See Also

grid.curve, grid.vwline, grid.vwcurve, grid.brushXspline, grid.vwXspline

Examples

grid.newpage()
x <- c(.2, .4, .2, .4)
y <- c(.2, .4, .4, .2)
grid.vwXspline(x, y, c(0, .1, .1, 0))
x <- c(.2, .4, .2, .4) + .4
y <- c(.2, .4, .4, .2)
grid.vwXspline(x, y, c(0, .1, .1, 0), render=vwPath("evenodd"))
x <- c(.2, .4, .2, .4) 
y <- c(.2, .4, .4, .2) + .4
grid.brushXspline(verticalBrush, x, y, c(0, .02, .02, 0))
x <- c(.2, .4, .2, .4) + .4
y <- c(.2, .4, .4, .2) + .4
grid.brushXspline(verticalBrush, x, y, c(0, .02, .02, 0),
                  render=vwPolygon)

vwline documentation built on Sept. 11, 2024, 7:56 p.m.

Related to vwPath in vwline...