MCPcopy Create free account
hub / github.com/openscopeproject/InteractiveHtmlBom / drawDrawing

Function drawDrawing

InteractiveHtmlBom/web/render.js:254–262  ·  view source on GitHub ↗
(ctx, scalefactor, drawing, color)

Source from the content-addressed store, hash-verified

252}
253
254function 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
264function getCirclePath(radius) {
265 var path = new Path2D();

Callers 2

drawFootprintFunction · 0.85
drawEdgeCutsFunction · 0.85

Calls 3

drawedgeFunction · 0.85
drawPolygonShapeFunction · 0.85
drawTextFunction · 0.85

Tested by

no test coverage detected