andre-dietrich/elm-svgbob/3.0.0

NOTE: the latest version is 5.0.8

SvgBob

Convert ASCII to SVG

It is a fork of Ivan Ceras example that is hosted at:

https://github.com/ivanceras/elm-examples

getSvg : Settings -> List (Attribute msg) -> String -> Html msg

Get the resulting svg and pass it into a div or whatever

default : Settings

Default parameters to work with ...

default =
    { fontSize = 14.0
    , lineWidth = 1.0
    , textWidth = 8.0
    , textHeight = 16.0
    , arcRadius = 4.0
    , strokeColor = "black"
    , textColor = "black"
    , backgroundColor = "white"
    , verbatim = '"'
    , multilineVerbatim = False
    }
Settings
-> List (Attribute msg)
-> (String -> Svg msg)
-> String
-> Html msg

Get the resulting svg and pass it into a div or parse it further or do whatever ...

type alias Settings =
Settings

general settings ...

type alias Settings =
    { fontSize : Float
    , lineWidth : Float
    , textWidth : Float
    , textHeight : Float
    , arcRadius : Float
    , strokeColor : String
    , textColor : String
    , backgroundColor : String
    , verbatim : Char
    , multilineVerbatim : Bool
    }