Small rebase tidyup + cleanup
This commit is contained in:
parent
d1b75dd633
commit
8cd986f15a
24
pdf.js
24
pdf.js
@ -2287,6 +2287,14 @@ var CanvasGraphics = (function() {
|
|||||||
this.ScratchCanvas = imageCanvas || ScratchCanvas;
|
this.ScratchCanvas = imageCanvas || ScratchCanvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var LINE_CAP_STYLES = [ "butt", "round", "square" ];
|
||||||
|
var LINE_JOIN_STYLES = [ "miter", "round", "bevel" ];
|
||||||
|
var NORMAL_CLIP = {};
|
||||||
|
var EO_CLIP = {};
|
||||||
|
|
||||||
|
// Used for tiling patterns
|
||||||
|
var PAINT_TYPE_COLORED = 1, PAINT_TYPE_UNCOLORED = 2;
|
||||||
|
|
||||||
constructor.prototype = {
|
constructor.prototype = {
|
||||||
map: {
|
map: {
|
||||||
// Graphics state
|
// Graphics state
|
||||||
@ -2381,18 +2389,8 @@ var CanvasGraphics = (function() {
|
|||||||
// Compatibility
|
// Compatibility
|
||||||
BX: "beginCompat",
|
BX: "beginCompat",
|
||||||
EX: "endCompat",
|
EX: "endCompat",
|
||||||
};
|
},
|
||||||
}
|
|
||||||
|
|
||||||
var LINE_CAP_STYLES = [ "butt", "round", "square" ];
|
|
||||||
var LINE_JOIN_STYLES = [ "miter", "round", "bevel" ];
|
|
||||||
var NORMAL_CLIP = {};
|
|
||||||
var EO_CLIP = {};
|
|
||||||
|
|
||||||
// Used for tiling patterns
|
|
||||||
var PAINT_TYPE_COLORED = 1, PAINT_TYPE_UNCOLORED = 2;
|
|
||||||
|
|
||||||
constructor.prototype = {
|
|
||||||
translateFont: function(fontDict, xref, resources) {
|
translateFont: function(fontDict, xref, resources) {
|
||||||
var fd = fontDict.get("FontDescriptor");
|
var fd = fontDict.get("FontDescriptor");
|
||||||
if (!fd)
|
if (!fd)
|
||||||
@ -2855,7 +2853,7 @@ var CanvasGraphics = (function() {
|
|||||||
this.ctx.scale(1, -1);
|
this.ctx.scale(1, -1);
|
||||||
|
|
||||||
if (this.ctx.$showText) {
|
if (this.ctx.$showText) {
|
||||||
this.ctx.$showText(this.current.y, text, Fonts.charsToUnicode(text));
|
this.ctx.$showText(this.current.y, Fonts.charsToUnicode(text));
|
||||||
} else {
|
} else {
|
||||||
text = Fonts.charsToUnicode(text);
|
text = Fonts.charsToUnicode(text);
|
||||||
this.ctx.translate(this.current.x, -1 * this.current.y);
|
this.ctx.translate(this.current.x, -1 * this.current.y);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Simple pdf.js page viewer worker</title>
|
<title>Simple pdf.js page worker viewer</title>
|
||||||
<script type="text/javascript" src="worker_client.js"></script>
|
<script type="text/javascript" src="worker_client.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
@ -55,9 +55,9 @@ function WorkerPDFDoc(canvas) {
|
|||||||
currentX = currentXStack.pop();
|
currentX = currentXStack.pop();
|
||||||
},
|
},
|
||||||
|
|
||||||
"$showText": function(y, text, uniText) {
|
"$showText": function(y, text) {
|
||||||
this.translate(currentX, -1 * y);
|
this.translate(currentX, -1 * y);
|
||||||
this.fillText(uniText, 0, 0);
|
this.fillText(text, 0, 0);
|
||||||
currentX += this.measureText(text).width;
|
currentX += this.measureText(text).width;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user