on 0050bfa help sign in
elk/libraries/Graphics/LineStyle.elm
31 lines 587 B history raw
2module Graphics.LineStyle where
4import Graphics.Color as Color
6data LineCap = Butt | Round | Square
7data LineJoin = Soft | Sharp | Clip
9type LineStyle = {
10 color : Color,
11 width : Float,
12 cap : LineCap,
13 join : LineJoin,
14 miterLimit : Float,
15 dashing : [Int],
16 dashOffset : Int
17 }
19default = {
20 color = black,
21 width = 1,
22 cap = Butt,
23 join = Miter,
24 dashing = [],
25 dashOffset = 0,
26 miterLimit = 10
27 }
29solid clr = { default | color <- clr }
30dashed clr = { default | color <- clr, dashing <- [8,4] }
31dotted clr = { default | color <- clr, dashing <- [3,3] }