elm/libraries/Graphics/LineStyle.elm
evancz 95679501d2 Add Build.hs which constructs the elm-runtime.
Found bugs in some files which are temporarily fixed: Weird type error in Either, name collision in LineStyle and syntax error in Json.Experimental
2013-03-10 22:42:57 -07:00

31 lines
No EOL
578 B
Elm

module Graphics.LineStyle where
import Graphics.Color
data LineCap = Butt | Round | Square
data LineJoin = Soft | Sharp | Clip
type LineStyle = {
color : Color,
width : Float,
cap : LineCap,
join : LineJoin,
miterLimit : Float,
dashing : [Int],
dashOffset : Int
}
default = {
color = black,
width = 1,
cap = Butt,
join = Miter,
dashing = [],
dashOffset = 0,
miterLimit = 10
}
solid clr = { default | color <- clr }
dashed clr = { default | color <- clr, dashing <- [8,4] }
dotted clr = { default | color <- clr, dashing <- [3,3] }