Create an SVG pattern which will fill
an element with checks.
create_pattern_check( id, angle = 45, spacing = 20, alpha = 1, fg_alpha = 1, colour = "#000000", ... )
id | id to use for pattern. If NULL then generate rando ID |
---|---|
angle | rotation angle (degrees) |
spacing | space between features |
alpha | default: 1.0 (opaque) |
fg_alpha | alpha of the features |
colour | colour of the features. e.g. '#345678' |
... | other arguments ignored |
minisvg::SVGPattern object
if (FALSE) { # Create an SVG document library(minisvg) doc <- minisvg::svg_doc() # Create the pattern and add to the SVG definitions my_pattern <- create_pattern_check(id = 'mypattern') doc$defs(my_pattern) # Create a rectangle with the animation rect <- stag$rect( x = "10%", y = "10%", width = "80%", height = "80%", stroke = 'black', fill = my_pattern ) # Add this rectangle to the document, show the SVG text, then render it doc$append(rect) doc doc$show() }