Commit Graph

19 Commits

Author SHA1 Message Date
Yury Delendik
006e8fb59d Introduces UMD headers to the web/ folder. 2016-04-13 10:09:48 -05:00
Jonas Jenwald
b5582e14a9 [PDFThumbnailView] Re-factor the canvas to image conversion such that we always render to a canvas, and then replace it with an image once rendering is done
*This is a follow-up to PRs 6299 and 6441.*

The patch also adds an option to `PDFThumbnailView`, that disables the canvas-to-image conversion entirely, which might be useful in the context of issue 7026.
2016-02-28 18:18:12 +01:00
Jonas Jenwald
95aa8b0415 Remove the hasImage property from PDFThumbnailView
The `hasImage` property is a left-over from older thumbnail code, and has been made obsolete by `renderingState`.
Having two different properties tracking (basically) the same state is asking for trouble, since it's very easy to forget to update one of them, with annoying bugs as the result.
2016-02-25 17:04:11 +01:00
Yury Delendik
194994a289 Merge pull request #6551 from yurydelendik/subaa
[api-minor] Enables subpixel anti-aliasing for most of the content.
2015-11-17 19:45:32 -06:00
Yury Delendik
1d8800370a Allow subpixel anti-aliasing for most of the content. 2015-11-16 10:50:02 -06:00
Manas
a2ba1b8189 Uses editorconfig to maintain consistent coding styles
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
2015-11-14 07:32:18 +05:30
Yury Delendik
5135aa9bec Adds deprecation warning for the API calls. 2015-10-23 09:06:32 -05:00
Jonas Jenwald
1b50932eaa Don't show thumbnails until the canvas to image conversion is done (issue 6442) 2015-09-12 12:05:40 +02:00
Jonas Jenwald
d7a90d83de Delete, and clear, the image in PDFThumbnailView_reset
*Follow-up to PR 6299.*
2015-09-11 14:12:58 +02:00
Jonas Jenwald
555c7925a0 Prevent setImage from failing to display small thumbnails, by adding a missing canvas to image conversion
*Follow-up to PR 6299.*
2015-09-11 14:12:57 +02:00
Jonas Jenwald
ebce928149 Extract the conversion from canvas to image into a helper function in PDFThumbnailView
*Follow-up to PR 6299.*

This patch reduces unnecessary code duplication for the `canvas` to `image` conversion. It also does a bit of re-ordering (and adds new lines) in `_getPageDrawContext`, since that function currently is a bit hard to read.
2015-09-11 14:12:48 +02:00
awang
161def7f4e Convert canvas thumbnails to PNG #6299 2015-09-04 09:58:47 +08:00
Mike Corbin
357ee6cbb2 viewer: Support Retina/HiDPI thumbnails
Reuse the existing getOutputScale() machinery to render and/or rescale
thumbnail images to the native display resolution. Fixes blurry thumbnails on
HiDPI displays making it a lot easier to make out the content.
2015-05-18 15:13:46 +01:00
Jonas Jenwald
eed67ea8bb Remove the |el| property in PDFPageView and PDFThumbnailView 2015-02-27 00:26:02 +01:00
Jonas Jenwald
777d69b52e Remove dead code from PDFThumbnailView 2015-01-26 20:52:46 +01:00
Jonas Jenwald
b7041f81f4 Enable cancelling of thumbnail drawing
This is useful if thumbnails are being rendered when the document is rotated, since it let us abort the current rendering.
2015-01-26 20:52:45 +01:00
Jonas Jenwald
878aa76c15 Refactor PDFThumbnailView to look more similar to PDFPageView
This includes an optimization to zero the height and width of existing thumbnail canvases, when they are removed and recreated during rotation of the document. (Credit goes to nnethercote, who initially found this in PR 4920.)
2015-01-26 20:52:45 +01:00
Jonas Jenwald
7f8f404536 Rename ThumbnailView to PDFThumbnailView and refactor it to be more class-like 2015-01-26 20:52:44 +01:00
Jonas Jenwald
64ba38008f Rename the thumbnail_view.js file 2015-01-25 17:21:53 +01:00