\HeaderA{grid.draw}{Draw a grid grob}{grid.draw}
\keyword{dplot}{grid.draw}
\begin{Description}\relax
Produces graphical output from a graphical object.
\end{Description}
\begin{Usage}
\begin{verbatim}
grid.draw(x, recording=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An object of class \code{"grob"} or NULL.
\item[\code{recording}] A logical value to indicate whether the drawing
operation should be recorded on the Grid display list.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This is a generic function with methods for grob and gTree objects.

The grob and gTree methods automatically push any viewports in a
\code{vp} slot and automatically apply any \code{gpar} settings
in a \code{gp} slot.  In addition, the gTree method pushes and
ups any viewports in a \code{childrenvp} slot and automatically
calls \code{grid.draw} for any grobs in a \code{children} slot.

The methods for grob and gTree call the generic hook functions
\code{preDrawDetails}, \code{drawDetails}, and \code{postDrawDetails}
to allow classes derived from grob or gTree to perform
additional viewport pushing/popping and produce additional
output beyond the default behaviour for grobs and gTrees.
\end{Details}
\begin{Value}
None.
\end{Value}
\begin{Author}\relax
Paul Murrell
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{grob}{grob}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
grid.newpage()
## Create a graphical object, but don't draw it
l <- linesGrob()
## Draw it
grid.draw(l)
\end{ExampleCode}
\end{Examples}

