Skip to content

Commit

Permalink
Merge pull request #17 from stefan-hoeck/dashes
Browse files Browse the repository at this point in the history
[ new ] stroke-dasharray and -dashoffset attributes
  • Loading branch information
stefan-hoeck authored Jul 3, 2024
2 parents fbc6c75 + 67b9829 commit dc4784f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Text/SVG/Attribute.idr
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ parameters {0 s : String}
strokeWidth : (0 p : HasStroke s) => LengthOrPercentage -> SVGAttribute s
strokeWidth = Style "stroke-width" . interpolate

export
strokeDasharray : (0 p : HasStroke s) => List Double -> SVGAttribute s
strokeDasharray = Style "stroke-dasharray" . unwords . map renderDouble

export
strokeDashoffset : (0 p : HasStroke s) => Double -> SVGAttribute s
strokeDashoffset = Style "stroke-dashoffset" . renderDouble

export
points : (0 p : HasPoints s) => List Double -> SVGAttribute s
points = Points "points"
Expand Down

0 comments on commit dc4784f

Please sign in to comment.