Skip to contents

Checks what view_card() is given and reads it: the SVG code of a card, or the file of one, an SVG, whose code it reads, or a PNG.

Usage

card_source(card)

Arguments

card

A card: the file that a card function drew, an .svg or a .png, as the function returns it, or the SVG code that it returns with file = NULL.

Value

A list of svg, the SVG code, and png, the PNG file: one of them is NULL.

Examples

str(rghcard:::card_source(stats_card(example_stats(), file = NULL)))
#> List of 2
#>  $ svg: chr "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"900\" height=\"490\" viewBox=\"0 0 900 490\" role=\"img\" ari"| __truncated__
#>  $ png: NULL