Skip to contents

Get a Registered Shape

Usage

get_shape(name)

Arguments

name

Character. Name of the shape.

Value

The shape drawing function, or NULL if not found.

Examples

get_shape("circle")
#> function (x, y, size, fill, border_color, border_width, alpha = 1, 
#>     ...) 
#> {
#>     fill_col <- adjust_alpha(fill, alpha)
#>     border_col <- adjust_alpha(border_color, alpha)
#>     grid::circleGrob(x = grid::unit(x, "npc"), y = grid::unit(y, 
#>         "npc"), r = grid::unit(size, "npc"), gp = grid::gpar(fill = fill_col, 
#>         col = border_col, lwd = border_width))
#> }
#> <bytecode: 0x555fd8fa6c88>
#> <environment: namespace:cograph>