Multiple blit operations in a single call

nr_blit_bulk(dst, src, config)

Arguments

dst

destination native raster

src

list of native rasters

config

data.frame of configuration information for each blit which most contain: idx, x, y, x0, y0, w, h, hjust, vjust, respect_alpha, draw

Value

None. dst modifief by-reference and returned invisibly.

Examples

nr <- nr_new(90, 90, 'grey60')
config <- data.frame(
  idx = c(1, 2, 3, 4),
  x = c(10, 10, 40, 40),
  y = c(10, 40, 40, 10),
  x0 = 0L,
  y0 = 0L,
  w = -1L,
  h = -1L,
  hjust = 0,
  vjust = 0,
  respect_alpha = TRUE,
  render = TRUE
)
nr_blit_bulk(dst = nr, src = deer_sprites, config = config)
plot(nr)