Description Usage Arguments Details Value Examples
View source: R/create-anim-pattern-rotation.R
This animation targets the patternTransform
attribute, and thus onlyl
applies to patterns.
1 2 3 4 5 6 7 | create_anim_pattern_rotation(
duration = 16,
cx = 0,
cy = 0,
repeatCount = "indefinite",
...
)
|
duration |
time for full rotate (seconds). default: 16 |
cx, cy |
centre of rotation. default (0, 0) |
repeatCount |
default: 'indefinite' |
... |
other arguments passed to |
If you want to animate the rotation of an arbitrary SVG object, see create_anim_rotation.
minisvg SVGElement
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# Create the animation
anim1 <- create_anim_pattern_rotation(id = 'hello')
# Create a pattern and append the animation to the pattern
pat <- svgpatternsimple::create_pattern_stripe(id = 'stripe')
pat$append(anim1)
# Create an SVG document with a rectangle, add the pattern to the
# document definitions, and use the pattern in the rectangle
doc <- minisvg::svg_doc()
doc$defs(pat)
doc$rect(x=0, y=0, width='100%', height='100%', fill=pat)
# view the code and render the SVG
doc
doc$show()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.