summary_svg: Print summary of SVG file structure in console

View source: R/svgtools.R

summary_svgR Documentation

Print summary of SVG file structure in console

Description

Print summary of SVG file structure in console

Usage

summary_svg(svg)

Arguments

svg

XML document with SVG content.

Details

Prints helpful information to verify the content of the SVG file:

  • Named groups (XML elements 'g' with attribute 'id') and number of their child elements

  • Available frames (XML elements 'rect' with attribute 'id')

  • Used fonts, font sizes and font colors (in any XML elements with attributes 'font-family', 'font-size', 'fill' and 'stroke')

Examples

#read SVG file
fpath <- system.file("extdata", "fig1.svg", package="svgtools")
svg <- read_svg(file = fpath)

#show a summary of SVG file
summary_svg(svg = svg)

svgtools documentation built on June 22, 2024, 10:35 a.m.