From 67e1d0597b35091361c4e3be31f325a40b9e581f Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Thu, 23 Jun 2011 23:55:14 +0200 Subject: [PATCH] Small rebase tidyup + cleanup --- pdf.js | 24 +++++++++++------------- viewer_worker.html | 2 +- worker_client.js | 4 ++-- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/pdf.js b/pdf.js index 847067946..da5926c09 100644 --- a/pdf.js +++ b/pdf.js @@ -2287,6 +2287,14 @@ var CanvasGraphics = (function() { 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 = { map: { // Graphics state @@ -2381,18 +2389,8 @@ var CanvasGraphics = (function() { // Compatibility BX: "beginCompat", 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) { var fd = fontDict.get("FontDescriptor"); if (!fd) @@ -2855,7 +2853,7 @@ var CanvasGraphics = (function() { this.ctx.scale(1, -1); if (this.ctx.$showText) { - this.ctx.$showText(this.current.y, text, Fonts.charsToUnicode(text)); + this.ctx.$showText(this.current.y, Fonts.charsToUnicode(text)); } else { text = Fonts.charsToUnicode(text); this.ctx.translate(this.current.x, -1 * this.current.y); diff --git a/viewer_worker.html b/viewer_worker.html index d13935f13..51f2b9d8a 100644 --- a/viewer_worker.html +++ b/viewer_worker.html @@ -1,6 +1,6 @@ - Simple pdf.js page viewer worker + Simple pdf.js page worker viewer