Convert a named list of CSS style information into a gpar object. E.g. list(stroke = 'black') is converted to gpar(col = 'black').

style_to_gpar(style, state)

Arguments

style

named list of style properties for an element. E.g. list(stroke = 'black')

state

state information. See inline documentation for read_svg for more information.

Value

gpar object

Details

This function handles stroke and fill colours (and separate alphas for each), fonts, linear and radial gradients, line parameters (width, join and end types etc).

Not yet done:

  • Conversion of line type information from CSS to gpar