elm-community/typed-svg/2.0.0

NOTE: this package is not compatible with Elm 0.19.1

TypedSvg.Extra.InPx

Typed SVG elements that default to px units

Helpers

centeredImage : String -> Float -> Float -> Float -> Float -> Svg msg

Centers an image (png, svg, etc.) referenced by an url string and with a given image width and height on the given x, y coordinate. Usage example:

let
    width = 50.5
    height = 50.5
    x = 150
    y = 200
in
    centeredImage "/images/example.png" width height x y