hypo_read_svg: Read a cairo svg

View source: R/hypoimg_recolor_svg.R

hypo_read_svgR Documentation

Read a cairo svg

Description

hypo_read_svg imports a cairo svg image file.

Usage

hypo_read_svg(file_path)

Arguments

file_path

string skalar (manatory), the cairo svg to import

Details

This function reads a (cairo) svg file and turns it into a 'grid object' (grob). This can then be used to annotate ggplot plots.

To convert a regular svg into a cairo svg use the grConvert package:

grConvert::convertPicture("image.svg","image.c.svg")

Examples

svg_file <- system.file("extdata", "logo.c.svg", package = "hypoimg")
svg <- hypo_read_svg(svg_file)


k-hench/hypoimg documentation built on June 2, 2022, 1:49 a.m.