Register a new shape that can be used for node rendering.
Examples
# Register a custom hexagon shape
register_shape("hexagon", function(x, y, size, fill, border_color, border_width, ...) {
angles <- seq(0, 2 * pi, length.out = 7)
grid::polygonGrob(
x = x + size * cos(angles),
y = y + size * sin(angles),
gp = grid::gpar(fill = fill, col = border_color, lwd = border_width)
)
})