Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

paths

Convenience Functions for Path Segments


Description

These functions are convenience constructors for path segment objects of classes "PathMoveTo", "PathLineTo", "PathCurveTo" and "PathClosePath".

Usage

moveTo(x, y)
lineTo(x, y)
curveTo(x, y)
closePath(x, y)

Arguments

x

A numeric vector representing x-locations.

y

A numeric vector representing y-locations.

Details

For x and y, they should each be of length one so that they represent a single point location except in the case of curveTo. In the case of curveTo, it expects x and y vectors of length four, which represent control points in a cubic bezier curve.

Value

For moveTo, an object of class "PathMoveTo".

For lineTo, an object of class "PathLineTo".

For curveTo, an object of class "PathCurveTo".

For closePath, an object of class "PathClosePath".

Author(s)

Simon Potter


grImport2

Importing 'SVG' Graphics

v0.2-0
GPL (>= 2)
Authors
Simon Potter [aut], Paul Murrell [aut, cre] (<https://orcid.org/0000-0002-3224-8858>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.