mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Replace css color rgb(...) by #...
* it's faster to generate the color code in using a table for components * it's very likely a way faster to parse (when setting the color in the canvas)
This commit is contained in:
parent
bf870bd2ac
commit
9d11b51a3e
6 changed files with 15 additions and 18 deletions
|
@ -1951,12 +1951,12 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
this.current.patternFill = true;
|
||||
},
|
||||
setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) {
|
||||
const color = Util.makeCssRgb(r, g, b);
|
||||
const color = Util.makeHexColor(r, g, b);
|
||||
this.ctx.strokeStyle = color;
|
||||
this.current.strokeColor = color;
|
||||
},
|
||||
setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) {
|
||||
const color = Util.makeCssRgb(r, g, b);
|
||||
const color = Util.makeHexColor(r, g, b);
|
||||
this.ctx.fillStyle = color;
|
||||
this.current.fillColor = color;
|
||||
this.current.patternFill = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue