# NOT RUN {
if (interactive()) {
# Add a text element to an
# SVG drawing and erode it with
# the `filter_erode()` filter
SVG(width = 200, height = 100) %>%
svg_filter(
id = "erode",
filters = list(
filter_erode(radius = c(1, 0))
)
) %>%
svg_text(
x = 10, y = 40,
text = "Erosion",
attrs = svg_attrs_pres(
font_size = "3em",
font_weight = "bolder",
filter = "erode"
)
)
}
# }
Run the code above in your browser using DataLab