Skip to contents

grid_add_cropmarks() adds crop marks to the edges of components of a print-and-play layout.

Usage

grid_add_cropmarks(
  ...,
  layout = "poker_3x3",
  bleed = NULL,
  gp = gpar(),
  cm_width = unit(0.25, "mm"),
  cm_length = unit(0.125, "in")
)

Arguments

...

Passed to piecepackr::grid.cropmark().

layout

Either a layout preset name in layout_names() or a data frame with layout data (as returned by layout_grid()).

bleed

Passed to piecepackr::grid.cropmark(). If NULL defaults to max(max(layout$bleed), 0.125).

gp, cm_width, cm_length

Passed to piecepackr::grid.cropmark().

Value

NULL invisibly. As a side effect draws crop marks to the active graphics device.

Details

  • This function draws in inches so make sure your graphics device is "big" enough.

Examples

if (requireNamespace("piecepackr", quietly = TRUE) &&
    utils::packageVersion("piecepackr") >= "1.14.0-6") {
  grid::grid.newpage()
  vp <- grid::viewport(width=8.5, height=11, default.units="in",
                       x=0.5, y=0.5, just=c("left", "bottom"))
  grid::pushViewport(vp)
  grid_add_rects(layout = "poker_3x3")
  grid_add_cropmarks(layout = "poker_3x3")
  grid::popViewport()
}