(r, g, b, a)
| 653 | } |
| 654 | |
| 655 | function 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 | |
| 669 | function fill(r, g, b, a) { |
| 670 | /* Sets the current fill color for drawing primitives and paths. |
nothing calls this directly
no test coverage detected
searching dependent graphs…