(ctx, scalefactor, drawing, color)
| 252 | } |
| 253 | |
| 254 | function drawDrawing(ctx, scalefactor, drawing, color) { |
| 255 | if (["segment", "arc", "circle", "curve", "rect"].includes(drawing.type)) { |
| 256 | drawedge(ctx, scalefactor, drawing, color); |
| 257 | } else if (drawing.type == "polygon") { |
| 258 | drawPolygonShape(ctx, scalefactor, drawing, color); |
| 259 | } else { |
| 260 | drawText(ctx, drawing, color); |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | function getCirclePath(radius) { |
| 265 | var path = new Path2D(); |
no test coverage detected