Draw circles on a native raster image

nr_circle(nr, x, y, r, fill = "black", color = NA, use_alpha = TRUE)

Arguments

nr

native raster image

x, y

coordinates of centre of circle. [vector]

r

radius [vector]

fill

interior fill color [vector]

color

outline color. Default: NA. [vector]

use_alpha

Use alpha channel when drawing? Logical. Default: TRUE

Value

Invisibly return the supplied native raster image which was been modified in-place

See also

Examples

N <- 201
nr <- nr_new(N, N, 'grey80')
nr_circle(nr, x = N/2, y = N/2, r = c(N/3, N/4), fill = c('darkred', 'black'))
plot(nr)