Rev 85981 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/grid/man/grobX.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2007 R Core Team% Distributed under GPL 2 or later\name{grobX}\alias{grobX}\alias{grobY}\title{Create a Unit Describing a Grob Boundary Location}\description{These functions create a unit object describing a location somewhereon the boundary ofa grob. They are generic.}\usage{grobX(x, theta)grobY(x, theta)}\arguments{\item{x}{A grob, or \I{gList}, or \I{gTree}, or \I{gPath}.}\item{theta}{An angle indicating where the location ison the grob boundary. Can be one of \code{"east"},\code{"north"}, \code{"west"}, or \code{"south"},which correspond to angles 0, 90, 180, and 270,respectively.}}\details{The angle is anti-clockwise with zero corresponding to a linewith an origin centred between the extremepoints of the shape, and pointing at 3 o'clock.If the grob describes a single shape, the boundary value shouldcorrespond to the exact edge of the shape.If the grob describes multiple shapes, the boundaryvalue will either correspond to the edge of a bounding box around all ofthe shapes described by the grob (for multiple rectangles, circles,\I{xspline}s, or text), or to aconvex hull around all vertices of all shapes described by the grob(for multiple polygons, points, lines, polylines,and segments).Points grobs are currently a special case because the convex hullis based on the data symbol \emph{locations} and does not takeinto account the extent of the data symbols themselves.The extents of any arrow heads are currently \emph{not} taken into account.}\value{A unit object.}\author{Paul Murrell}\seealso{\code{\link{unit}} and\code{\link{grobWidth}}}\keyword{dplot}