| grobCoords {grid} | R Documentation |
Calculate Points on the Perimeter of a Grob
Description
These functions calculate points along the perimeter (or length) of a grob.
Usage
grobCoords(x, closed, ...)
grobPoints(x, closed, ...)
isClosed(x, ...)
Arguments
x |
A grob object. |
closed |
Whether we are asking for points along the perimeter of a closed object or points along the length of an open object. Some grobs (e.g., X-splines) can do both. This defaults to |
... |
Arguments to be used by methods. |
Details
The difference between grobCoords and grobPoints
is that grobCoords performs all pre- and post-drawing operations
on the grob that would normally occur if the grob was being drawn,
then calls grobPoints. So the former takes into account
any vp and gp settings on the grob. This means
that users should usually only want to call grobCoords;
only (expert) developers may have a need to call grobPoints.
Custom grobs can write their own methods for grobPoints
(see gridCoords).
The isClosed function returns TRUE or FALSE
to indicate whether a grob is a closed shape. The default response
is TRUE, unless a method has been defined otherwise
(e.g., for lines and line segments).
Value
Either a "GridGrobCoords" object
(a list of lists with components x and y) or
a "GridGTreeCoords" object
(a list of "GridGrobCoords" and/or "GridGTreeCoords"
objects).
All locations are in inches relative to the current grid viewport.
Author(s)
Paul Murrell