\HeaderA{roundrect}{Draw a rectangle with rounded corners}{roundrect}
\aliasA{grid.roundrect}{roundrect}{grid.roundrect}
\aliasA{roundrectGrob}{roundrect}{roundrectGrob}
\keyword{dplot}{roundrect}
\begin{Description}\relax
Draw a \emph{single} rectangle with rounded corners.
\end{Description}
\begin{Usage}
\begin{verbatim}
roundrectGrob(x=0.5, y=0.5, width=1, height=1,
              default.units="npc",
              r=unit(0.1, "snpc"),
              just="centre",
              name=NULL, gp=NULL, vp=NULL) 
grid.roundrect(...) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x, y, width, height}] The location and size of the rectangle.
\item[\code{default.units}] A string indicating the default units to use
if \code{x}, \code{y}, \code{width}, or \code{height}
are only given as numeric vectors.
\item[\code{r}] The radius of the rounded corners.
\item[\code{just}] The justification of the rectangle relative to its
location.
\item[\code{name}] A name to identify the grob.
\item[\code{gp}] Graphical parameters to apply to the grob.
\item[\code{vp}] A viewport object or \code{NULL}.
\item[\code{...}] Arguments to be passed to \code{roundrectGrob()}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
At present, this function can only be used to draw \emph{one}
rounded rectangle.
\end{Details}
\begin{Examples}
\begin{ExampleCode}
grid.roundrect(width=.5, height=.5, name="rr")
theta <- seq(0, 360, length=50)
for (i in 1:50) 
    grid.circle(x=grobX("rr", theta[i]),
                y=grobY("rr", theta[i]),
                r=unit(1, "mm"),
                gp=gpar(fill="black"))
\end{ExampleCode}
\end{Examples}

