File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,14 @@ exports.setLineWidth = function(ctx) {
81
81
} ;
82
82
} ;
83
83
84
+ exports . setLineDash = function ( ctx ) {
85
+ return function ( dash ) {
86
+ return function ( ) {
87
+ ctx . setLineDash ( dash ) ;
88
+ } ;
89
+ } ;
90
+ } ;
91
+
84
92
exports . setFillStyle = function ( ctx ) {
85
93
return function ( style ) {
86
94
return function ( ) {
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ module Graphics.Canvas
37
37
, canvasToDataURL
38
38
39
39
, setLineWidth
40
+ , setLineDash
40
41
, setFillStyle
41
42
, setStrokeStyle
42
43
, setShadowBlur
@@ -203,6 +204,9 @@ foreign import canvasToDataURL :: forall eff. CanvasElement -> Eff (canvas :: CA
203
204
-- | Set the current line width.
204
205
foreign import setLineWidth :: forall eff . Context2D -> Number -> Eff (canvas :: CANVAS | eff ) Unit
205
206
207
+ -- | Set the current line dash pattern.
208
+ foreign import setLineDash :: forall eff . Context2D -> Array Number -> Eff (canvas :: CANVAS | eff ) Unit
209
+
206
210
-- | Set the current fill style/color.
207
211
foreign import setFillStyle :: forall eff . Context2D -> String -> Eff (canvas :: CANVAS | eff ) Unit
208
212
You can’t perform that action at this time.
0 commit comments