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:
parent
fa1133f784
commit
6bacb38692
2 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue