(layername, canvas, layer, scalefactor, edgeColor, polygonColor, textColor)
| 409 | } |
| 410 | |
| 411 | function drawBgLayer(layername, canvas, layer, scalefactor, edgeColor, polygonColor, textColor) { |
| 412 | var ctx = canvas.getContext("2d"); |
| 413 | for (var d of pcbdata.drawings[layername][layer]) { |
| 414 | if (["segment", "arc", "circle", "curve", "rect"].includes(d.type)) { |
| 415 | drawedge(ctx, scalefactor, d, edgeColor); |
| 416 | } else if (d.type == "polygon") { |
| 417 | drawPolygonShape(ctx, scalefactor, d, polygonColor); |
| 418 | } else { |
| 419 | drawText(ctx, d, textColor); |
| 420 | } |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | function drawTracks(canvas, layer, defaultColor, highlight) { |
| 425 | ctx = canvas.getContext("2d"); |
no test coverage detected