View source: R/save_piece_images.R
save_piece_images | R Documentation |
Saves images of all individual piecepack pieces.
save_piece_images(
cfg = getOption("piecepackr.cfg", pp_cfg()),
directory = tempdir(),
format = "svg",
angle = 0
)
cfg |
Piecepack configuration list |
directory |
Directory where to place images |
format |
Character vector of formats to save images in |
angle |
Numeric vector of angles to rotate images (in degrees) |
# May take more than 5 seconds on CRAN server
if (all(capabilities(c("cairo", "png")))) {
cfg <- pp_cfg(list(suit_color="darkred,black,darkgreen,darkblue,grey"))
save_piece_images(cfg, directory=tempdir(), format="svg", angle=0)
save_piece_images(cfg, directory=tempdir(), format="png", angle=90)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.