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