diff --git a/test/example/setLineDash.js b/test/example/setLineDash.js new file mode 100644 index 0000000..7b09cdc --- /dev/null +++ b/test/example/setLineDash.js @@ -0,0 +1,12 @@ +window.C2S_EXAMPLES['setLineDash'] = function(ctx) { + ctx.save(); + ctx.lineWidth = 4; + for (var i = 0; i < 10; i++){ + ctx.setLineDash([(i+1)*5,10]); + ctx.beginPath(); + ctx.moveTo(5+i*14,5); + ctx.lineTo(5+i*14,140); + ctx.stroke(); + } + ctx.restore(); +}; \ No newline at end of file diff --git a/test/playground.html b/test/playground.html index ab1cad2..67cf143 100644 --- a/test/playground.html +++ b/test/playground.html @@ -20,7 +20,7 @@
- +
@@ -64,7 +64,7 @@ -
+