A class representing a literal SVG element.

A class representing a literal SVG element.

Super class

minisvg::SVGNode -> SVGLiteral

Public fields

x

literal contents. Must be coercible to string via 'as.character(x)'

name

kept only for compatibility with other SVGNode objects. This should be set to 'literal'

Methods

Public methods

Inherited methods

Method new()

Initialize an SVGElement

Usage

SVGLiteral$new(x, ...)

Arguments

x

the literal text to include

...

further arguments. Named arguments treated as attributes, unnamed arguments treated as child nodes


Method update()

Update the SVG Element.

Usage

SVGLiteral$update(x, ...)

Arguments

x

the literal text to include

...

attributes and children to set on this node

Details

Named arguments are considered attributes and will overwrite existing attributes with the same name. Set to NULL to delete the attribute

Unnamed arguments are appended to the list of child nodes. These should be text, other SVGElements or any ojbect that can be represented as a single text string using "as.character()"

To print just the attribute name, but without a value, set to NA


Method as_character_inner()

Convert this SVGLiteral

Usage

SVGLiteral$as_character_inner(...)

Arguments

...

ignored

Returns

single character string


Method as_character()

Convert this SVGLiteral

Usage

SVGLiteral$as_character(...)

Arguments

...

ignored

Returns

single character string


Method clone()

The objects of this class are cloneable with this method.

Usage

SVGLiteral$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.