(x0, y0, x1, y1, options)
| 1929 | /*--- DRAWING PRIMITIVES ---------------------------------------------------------------------------*/ |
| 1930 | |
| 1931 | function line(x0, y0, x1, y1, options) { |
| 1932 | /* Draws a straight line from x0, y0 to x1, y1. |
| 1933 | * The current stroke, strokewidth and strokestyle are applied. |
| 1934 | */ |
| 1935 | // It is faster to do it directly without creating a Path: |
| 1936 | var a = _colorMixin(options); |
| 1937 | if (a[1] && a[1].a > 0) { |
| 1938 | _ctx.beginPath(); |
| 1939 | _ctx.moveTo(x0, y0); |
| 1940 | _ctx.lineTo(x1, y1); |
| 1941 | _ctx_stroke(a[1], a[2], a[3], a[4]); |
| 1942 | } |
| 1943 | } |
| 1944 | |
| 1945 | function rect(x, y, width, height, options) { |
| 1946 | /* Draws a rectangle with the top left corner at x, y. |
nothing calls this directly
no test coverage detected
searching dependent graphs…