add_background: Add background color

Description Usage Arguments Value Examples

View source: R/spirograph.R

Description

Add background color

Usage

1
2
3
4
5
6
7
add_background(
  input,
  color = "black",
  rounding = 0,
  openfile = TRUE,
  output = input
)

Arguments

input

File name of .svg file to input

color

Vector of background color

rounding

Rounding of background rectangle's corners. The default is 0 (no rounding). A rounding value of 1 creates a circle. If rounding is a vector of 2 values, the x and y rounding parameters are set separately.

openfile

Open file in default program for .svg format. Defaults to FALSE.

output

File name of .svg file to output. Default is to overwrite the input file.

Value

output name

Examples

1
2
3
4
5
6
library(spiro)
spiro(
  fixed_radius = 3,
  cycling_radius = 1,
  file = "add_background.svg") %>%
  add_background(color = "black")

wjschne/spiro documentation built on Dec. 16, 2020, 6:48 p.m.