% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nr-blit.R
\name{nr_blit_multi}
\alias{nr_blit_multi}
\title{Multiple blit operations in a single call}
\usage{
nr_blit_multi(dst, src, config)
}
\arguments{
\item{dst}{destination native raster}

\item{src}{list of native raster images.}

\item{config}{data.frame of configuration information for each blit.
Columns in this data.frame match the arguments to \code{nr_blit()}.
Requires columns:
\describe{
  \item{\code{idx}}{The index of the image in the \code{src} list i.e. \code{src[[idx]]}}
  \item{\code{x,y}}{location in \code{dst} to place \code{src[[idx]]}}
} 
Optional columns which take a default value if not present:
\describe{
  \item{\code{xsrc,ysrc}}{start coordinates within src. Default: (0, 0)}
  \item{\code{w,h}}{size within \code{src}. Default: use whole width/height}
  \item{\code{hjust,vjust}}{Default: (0.5, 0.5)}
  \item{\code{angle}}{Default: 0}
  \item{\code{scale}}{Zoom factor. Default: 1}
  \item{\code{use_alpha}}{Default: true}
  \item{\code{render}}{Should this given operation be rendered? Default: true}
}}
}
\value{
Invisibly return the supplied \code{dst} native raster image which was been
        modified in-place
}
\description{
Multiple blit operations in a single call
}
\examples{
nr <- nr_new(90, 90, 'grey60')

config <- data.frame(
  idx = c(1, 2, 3, 4),
  x = c(10, 10, 40, 40) + 15,
  y = c(10, 40, 40, 10) + 15,
  xsrc = 0L,
  ysrc = 0L,
  w = -1L,
  h = -1L,
  hjust = 0.5,
  vjust = 0.5,
  angle = c(0, 0, 0, pi/4),
  scale = c(0.5, 1, 1, 1),
  use_alpha = TRUE,
  render = TRUE
)

nr_blit_multi(dst = nr, src = deer, config = config)
plot(nr)
}
\seealso{
Other blitting functions: 
\code{\link{nr_blit}()}
}
\concept{blitting functions}
