(text: string, x: number, y: number)
| 149 | } |
| 150 | |
| 151 | public fillText(text: string, x: number, y: number): void { |
| 152 | if (text === '') { |
| 153 | return; |
| 154 | } |
| 155 | let s: string = `<text x="${x * this.scale}" y="${ |
| 156 | y * this.scale |
| 157 | }" style='stroke: none; font:${this.font.toCssString(this.settings.display.scale)}; ${this.getSvgBaseLine()}'`; |
| 158 | if (this.color.rgba !== '#000000') { |
| 159 | s += ` fill="${this.color.rgba}"`; |
| 160 | } |
| 161 | if (this.textAlign !== TextAlign.Left) { |
| 162 | s += ` text-anchor="${this.getSvgTextAlignment(this.textAlign)}"`; |
| 163 | } |
| 164 | s += `>${SvgCanvas._escapeText(text)}</text>`; |
| 165 | this.buffer += s; |
| 166 | } |
| 167 | |
| 168 | private static _escapeText(text: string) { |
| 169 | return text |
nothing calls this directly
no test coverage detected