MCPcopy Index your code
hub / github.com/clips/pattern / background

Function background

pattern/canvas.js:655–667  ·  view source on GitHub ↗
(r, g, b, a)

Source from the content-addressed store, hash-verified

653}
654
655function background(r, g, b, a) {
656 /* Sets the current background color.
657 */
658 if (r !== undefined) {
659 var tf = _ctx.currentTransform;
660 _ctx.state.background = (r instanceof Color)? new Color(r) : new Color(r, g, b, a);
661 _ctx_fill(_ctx.state.background);
662 _ctx.setTransform(1, 0, 0, 1, 0, 0); // Identity matrix.
663 _ctx.fillRect(0, 0, _ctx._canvas.width, _ctx._canvas.height);
664 _ctx.currenTransform = tf;
665 }
666 return _ctx.state.background;
667}
668
669function fill(r, g, b, a) {
670 /* Sets the current fill color for drawing primitives and paths.

Callers

nothing calls this directly

Calls 1

_ctx_fillFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…