1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Using setDash for dashed lines

This commit is contained in:
Yury Delendik 2012-12-04 08:26:10 -06:00
parent bcbc21a51c
commit a7f0e9612a
2 changed files with 16 additions and 8 deletions

View file

@ -391,10 +391,14 @@ var tests = [
ctx.moveTo(0,5);
ctx.lineTo(50, 5);
ctx.lineWidth = 10;
ctx.mozDash = [10, 10];
ctx.mozDashOffset = 0;
ctx.webkitLineDash = [10, 10];
ctx.webkitLineDashOffset = 0;
if ('setLineDash' in ctx) {
ctx.setLineDash([10, 10]);
ctx.lineDashOffset = 0;
} else {
ctx.mozDash = [10, 10];
ctx.mozDashOffset = 0;
}
ctx.stroke();
var data = ctx.getImageData(0, 0, 50, 50).data;