Kwarrtz / render

A lightweight graphics library for the Elm programming language
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

Implement dashed line styles #5

Closed avh4 closed 8 years ago

avh4 commented 8 years ago

The following example draws a solid line instead of a dashed line.

import Graphics.Render exposing (..)
import Color exposing (rgb)

main =
    segment ( 0, 0 ) ( 500, 500 )
        |> dashed 3 (rgb 80 80 80)
        |> svg canvasSize.width canvasSize.height

I noticed that currently the LineStyle in FLine is unused, so it looks like the code to generate the stroke-dasharray attribute (and maybe other attributes?) needs to be implemented.

I'll probably get around to making a PR for this later this month if no one else does so before then.

Kwarrtz commented 8 years ago

Fixed in v1.0.2