Allow subpixel anti-aliasing for most of the content.
This commit is contained in:
parent
f096e4ab91
commit
1d8800370a
7 changed files with 111 additions and 55 deletions
|
@ -46,7 +46,10 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
|
|||
|
||||
// Since this is a temporary canvas, we need to fill the canvas with a white
|
||||
// background ourselves. |_getPageDrawContext| uses CSS rules for this.
|
||||
var ctx = tempCanvas.getContext('2d');
|
||||
//#if MOZCENTRAL || FIREFOX || GENERIC
|
||||
tempCanvas.mozOpaque = true;
|
||||
//#endif
|
||||
var ctx = tempCanvas.getContext('2d', {alpha: false});
|
||||
ctx.save();
|
||||
ctx.fillStyle = 'rgb(255, 255, 255)';
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
|
@ -186,7 +189,10 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
|
|||
var canvas = document.createElement('canvas');
|
||||
this.canvas = canvas;
|
||||
|
||||
var ctx = canvas.getContext('2d');
|
||||
//#if MOZCENTRAL || FIREFOX || GENERIC
|
||||
canvas.mozOpaque = true;
|
||||
//#endif
|
||||
var ctx = canvas.getContext('2d', {alpha: false});
|
||||
var outputScale = getOutputScale(ctx);
|
||||
|
||||
canvas.width = (this.canvasWidth * outputScale.sx) | 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue