#
Output Templates
Victor renders its content using the :default
template.
If you wish to use another template, you can either use one of the built-in
templates (:default
or :minimal
), or provide your own:
svg = Victor::SVG.new template: :minimal
svg = Victor::SVG.new template: 'path/to/template.svg'
See the templates folder for an understanding of how templates are structured.
Templates can also be provided when rendering or saving the output:
svg.save 'filename', template: :minimal
svg.render template: :minimal
#
New Lines
By default, the generated SVGs will have a newline glue between the elements. You can change this (for example, to an empty string) if the default newlines are not appropriate for your use case.
svg = Victor::SVG.new glue: ''
The glue can also be provided when rendering or saving the output:
svg.save 'filename', glue: ''
svg.render glue: ''