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:
Calixte Denizet 2020-10-30 14:51:50 +01:00
parent bf870bd2ac
commit 9d11b51a3e
6 changed files with 15 additions and 18 deletions

View file

@ -571,7 +571,7 @@ const TilingPattern = (function TilingPatternClosure() {
current.strokeColor = ctx.strokeStyle;
break;
case PaintType.UNCOLORED:
const cssColor = Util.makeCssRgb(color[0], color[1], color[2]);
const cssColor = Util.makeHexColor(color[0], color[1], color[2]);
context.fillStyle = cssColor;
context.strokeStyle = cssColor;
// Set color needed by image masks (fixes issues 3226 and 8741).