(item: Box)
| 33 | } |
| 34 | |
| 35 | function renderBox(item: Box): string { |
| 36 | const rounded = item.style?.corners === "rounded"; |
| 37 | const text = item.text ? `<text x="${item.x + item.width / 2}" y="${item.y + item.height / 2}" text-anchor="middle" dominant-baseline="middle">${escapeXml(item.text)}</text>` : ""; |
| 38 | return `<rect x="${item.x}" y="${item.y}" width="${item.width}" height="${item.height}"${rounded ? " rx=\"8\" ry=\"8\"" : ""} stroke="${stroke(item.style)}" stroke-width="${strokeWidth(item.style)}" fill="${fill(item.style)}" />${text}`; |
| 39 | } |
| 40 | |
| 41 | function renderEllipse(item: Ellipse): string { |
| 42 | const cx = item.x + item.width / 2; |
no test coverage detected
searching dependent graphs…