mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #2572 from mduan/issue2477
Make canvas transform matrix account for devicePixelRatio
This commit is contained in:
commit
cca1a68adf
2 changed files with 6 additions and 1 deletions
|
@ -2078,6 +2078,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue