elm-community/typed-svg/3.1.0

NOTE: the latest version is 7.0.0

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