1% File src/library/grDevices/man/dev.capture.Rd
2% Part of the R package, https://www.R-project.org
3% Copyright 2011 R Core Team
4% Distributed under GPL 2 or later
5
6\name{dev.capture}
7\alias{dev.capture}
8\title{
9  Capture device output as a raster image
10}
11\description{
12  \code{dev.capture} captures the current contents of a graphics device
13  as a raster (bitmap) image.
14}
15\usage{
16dev.capture(native = FALSE)
17}
18\arguments{
19  \item{native}{Logical. If \code{FALSE} the result is a matrix of R
20    color names, if \code{TRUE} the output is returned as a
21    \code{nativeRaster} object which is more efficient for plotting, but
22    not portable.}
23}
24\details{
25  Not all devices support capture of the output as raster bitmaps.
26  Typically, only image-based devices do and even not all of them.
27}
28\value{
29  \code{NULL} if the device does not support capture, otherwise a
30  matrix of color names (for \code{native = FALSE}) or a
31  \code{nativeRaster} object (for \code{native = TRUE}).
32}
33\keyword{ dplot }
34