add_circle: Add a circle to the image

Description Usage Arguments Value Examples

View source: R/spirograph.R

Description

Add a circle to the image

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
add_circle(
  input,
  x = 0.5,
  y = 0.5,
  r = 1,
  color = "black",
  fill = "none",
  line_width = 1,
  openfile = TRUE,
  output = input
)

Arguments

input

File name of .svg file to input

x

x-coordinate of circle center (0 to 1)

y

y-coordinate of circle center (0 to 1)

r

radius (0 to 1)

color

line color

fill

fill color

line_width

width of line

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
spiro(fixed_radius = 3,
      cycling_radius = 1,
      file = "add_circle_example.svg",
      colors = "red") %>%
  add_circle(r = 0.308, fill = "white", color = "white")

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