grobCoords {grid} | R Documentation |
These functions calculate points along the perimeter (or length) of a grob.
grobCoords(x, closed, ...)
grobPoints(x, closed, ...)
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. |
... |
Arguments to be used by methods. |
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
).
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.
Paul Murrell