Description Usage Arguments Details Value Examples
Create a filter to apply Gaussian blur to an element.
1 | create_filter_blur(id, std_dev = 3, ...)
|
id |
id to use for filter. |
std_dev |
standard deviation of the gaussian blue. default: 3 |
... |
other arguments ignored |
For more information see the MDN SVG docs for feGaussianBlur
minisvg::SVGElement object representing a filter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
# Create an SVG document
library(minisvg)
doc <- minisvg::svg_doc()
# Create the filter and add to the SVG definitions
blur_filter <- create_filter_blur(id = 'myblur')
doc$defs(blur_filter)
# Create a rectangle with the animation
rect <- stag$rect(
x = "10%",
y = "10%",
width = "80%",
height = "80%",
fill = "lightblue",
stroke = 'black',
filter = blur_filter
)
# Add this rectangle to the document, show the SVG text, then render it
doc$append(rect)
doc
doc$show()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.