mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Use 3 param method for converting r,g,b into css string.
This avoids creation of temporary arrays to pass them into the util method. Also using "arguments" is more expensive then passing in 3 parameters.
This commit is contained in:
parent
d65db7c5ed
commit
ceffeab1de
6 changed files with 23 additions and 23 deletions
|
@ -822,11 +822,11 @@ var SVGGraphics = (function SVGGraphicsClosure() {
|
|||
this.current.miterLimit = limit;
|
||||
},
|
||||
setStrokeRGBColor: function SVGGraphics_setStrokeRGBColor(r, g, b) {
|
||||
var color = Util.makeCssRgb(arguments);
|
||||
var color = Util.makeCssRgb(r, g, b);
|
||||
this.current.strokeColor = color;
|
||||
},
|
||||
setFillRGBColor: function SVGGraphics_setFillRGBColor(r, g, b) {
|
||||
var color = Util.makeCssRgb(arguments);
|
||||
var color = Util.makeCssRgb(r, g, b);
|
||||
this.current.fillColor = color;
|
||||
this.current.tspan = document.createElementNS(NS, 'svg:tspan');
|
||||
this.current.xcoords = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue