SVGPattern Class
SVGPattern Class
This is a slightly specialized subclass of SVGElement which has methods
to specifically handle SVG <pattern> nodes
SVGPattern objects may also have their own 'filter_def' filter definition.
minisvg::SVGNode -> minisvg::SVGElement -> SVGPattern
filter_defA filter definition to accompany this pattern
Inherited methods
new()Initialise an SVGPattern object
SVGPattern$new(..., name = "pattern")
...Further arguments passed to SVGElement$new()
namedefaults to 'pattern', but some gradients may also be used here
as_full_svg()Wrap the SVG for this pattern in a full SVG document and return the text
SVGPattern$as_full_svg(width = 400, height = width)
height, widthdimensions of SVG wrapper around this pattern
save_full_svg()Save the SVG for this pattern in a full SVG document
SVGPattern$save_full_svg(filename, include_declaration = TRUE, ...)
filenamefilename for output
include_declarationInclude leading XML declaration. default: TRUE
...Further arguments passed to SVGPattern$as_full_svg()
as_character()Recursively convert this SVGElement and children to text
SVGPattern$as_character(..., depth = 0, include_declaration = FALSE)
...ignored
depthrecursion depth. default: 0
include_declarationInclude the leading XML declaration? default: FALSE
single character string
show()Render this pattern in the context of a complete SVG document
...Further arguments passed to SVGPattern$save_full_svg()
viewerviewer.
clone()The objects of this class are cloneable with this method.
SVGPattern$clone(deep = FALSE)
deepWhether to make a deep clone.
if (FALSE) { a <- SVGPattern$new() f <- stag$filter(id = "turbulence-filter", stag$feTurbulence(...)) a$filter_def <- f }