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
|
@ -1551,12 +1551,12 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
this.current.fillColor = this.getColorN_Pattern(arguments);
|
||||
},
|
||||
setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) {
|
||||
var color = Util.makeCssRgb(arguments);
|
||||
var color = Util.makeCssRgb(r, g, b);
|
||||
this.ctx.strokeStyle = color;
|
||||
this.current.strokeColor = color;
|
||||
},
|
||||
setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) {
|
||||
var color = Util.makeCssRgb(arguments);
|
||||
var color = Util.makeCssRgb(r, g, b);
|
||||
this.ctx.fillStyle = color;
|
||||
this.current.fillColor = color;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue