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

Make canvas transform matrix account for devicePixelRatio

This commit is contained in:
mduan 2013-01-15 16:40:39 -08:00
parent fa1133f784
commit 6bacb38692
2 changed files with 6 additions and 1 deletions

View file

@ -2048,6 +2048,9 @@ var PageView = function pageView(container, pdfPage, id, scale,
}
var ctx = canvas.getContext('2d');
// TODO(mack): use data attributes to store these
ctx._scaleX = outputScale.sx;
ctx._scaleY = outputScale.sy;
ctx.save();
ctx.fillStyle = 'rgb(255, 255, 255)';
ctx.fillRect(0, 0, canvas.width, canvas.height);