[Pkg-javascript-commits] [pdf.js] 159/207: Optimization of save/restore usage
David Prévot
taffit at moszumanska.debian.org
Mon Jul 28 15:36:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit c8a4ab3a1947eb6fc00f954bec36ad3a7c3843fa
Author: pramodhkp <prmdh1 at gmail.com>
Date: Mon Jun 23 22:29:42 2014 +0530
Optimization of save/restore usage
---
src/display/svg.js | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/src/display/svg.js b/src/display/svg.js
index 46d94c8..7d44d3e 100644
--- a/src/display/svg.js
+++ b/src/display/svg.js
@@ -134,7 +134,6 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
this.current = this.extraStack.pop();
this.tgrp = document.createElementNS(NS, 'svg:g');
- this.tgrp.setAttributeNS(null, 'id', 'transform');
this.tgrp.setAttributeNS(null, 'transform',
'matrix(' + this.transformMatrix + ')');
this.pgrp.appendChild(this.tgrp);
@@ -176,7 +175,6 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
transformMatrix);
this.tgrp = document.createElementNS(NS, 'svg:g');
- this.tgrp.setAttributeNS(null, 'id', 'transform');
this.tgrp.setAttributeNS(null, 'transform',
'matrix(' + this.transformMatrix + ')');
this.pgrp.appendChild(this.tgrp);
@@ -385,7 +383,6 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
},
showText: function SVGGraphics_showText(glyphs) {
- this.save();
var current = this.current;
var font = current.font;
var fontSize = current.fontSize;
@@ -438,13 +435,10 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
'matrix(' + current.textMatrix + ') scale(1, -1)' );
current.txtElement.setAttributeNS(XML_NS, 'xml:space', 'preserve');
current.txtElement.appendChild(current.tspan);
-
- current.txtgrp.setAttributeNS(null, 'id', 'text');
current.txtgrp.appendChild(current.txtElement);
this.tgrp.appendChild(current.txtElement);
- this.restore();
},
setLeadingMoveText: function SVGGraphics_setLeadingMoveText(x, y) {
@@ -644,28 +638,22 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
},
fill: function SVGGraphics_fill() {
- this.save();
var current = this.current;
current.element.setAttributeNS(null, 'fill', current.fillColor);
this.tgrp.appendChild(current.element);
- this.restore();
},
stroke: function SVGGraphics_stroke() {
- this.save();
var current = this.current;
current.element.setAttributeNS(null, 'stroke', current.strokeColor);
current.element.setAttributeNS(null, 'fill', 'none');
this.tgrp.appendChild(current.element);
- this.restore();
},
eoFill: function SVGGraphics_eoFill() {
- this.save();
var current = this.current;
current.element.setAttributeNS(null, 'fill', current.fillColor);
current.element.setAttributeNS(null, 'fill-rule', 'evenodd');
- this.restore();
},
fillStroke: function SVGGraphics_fillStroke() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list