Makes the picture of a card each time grid draws it, so again when the Plots pane is resized. An SVG card is drawn through rsvg at twice the size in pixels that it takes on the device, so that it stays sharp, and keeps its thin lines and small text when the device shrinks it; a PNG card is shown as it is.
Arguments
- x
The grob that
card_plot()draws, of classrghcard_card: the SVG code of the card insvg, or the picture of a PNG card inpicture.
Examples
card <- grid::gTree(svg = stats_card(example_stats(), file = NULL), picture = NULL,
cl = "rghcard_card")
grid::grid.newpage()
grid::grid.draw(card) # grid calls makeContent() as it draws the card