mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Allows 'dontFlip' as third argument in PDFPageProxy.getViewport
This commit is contained in:
parent
6521d2fd94
commit
3dfc540d04
2 changed files with 15 additions and 5 deletions
|
@ -783,14 +783,12 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
|
|||
* @param {number} scale The desired scale of the viewport.
|
||||
* @param {number} rotate Degrees to rotate the viewport. If omitted this
|
||||
* defaults to the page rotation.
|
||||
* @param {boolean} dontFlip (optional) If true, axis Y will not be flipped.
|
||||
* @return {PageViewport} Contains 'width' and 'height' properties
|
||||
* along with transforms required for rendering.
|
||||
*/
|
||||
getViewport: function PDFPageProxy_getViewport(scale, rotate) {
|
||||
if (arguments.length < 2) {
|
||||
rotate = this.rotate;
|
||||
}
|
||||
return new PageViewport(this.view, scale, rotate, 0, 0);
|
||||
getViewport(scale, rotate = this.rotate, dontFlip = false) {
|
||||
return new PageViewport(this.view, scale, rotate, 0, 0, dontFlip);
|
||||
},
|
||||
/**
|
||||
* @param {GetAnnotationsParameters} params - Annotation parameters.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue