* @param {CanvasRenderingContext2D} ctx * @param {string} text * @param {module:zrender/graphic/Style} style * @param {Object|boolean} [rect] {x, y, width, height} * If set false, rect text is not used. * @param {Element|module:zrender/graphic/helper/constant.WILL_BE_RESTORED}
(hostEl, ctx, text, style, rect, prevEl)
| 8423 | * @param {Element|module:zrender/graphic/helper/constant.WILL_BE_RESTORED} [prevEl] For ctx prop cache. |
| 8424 | */ |
| 8425 | function renderText(hostEl, ctx, text, style, rect, prevEl) { |
| 8426 | style.rich |
| 8427 | ? renderRichText(hostEl, ctx, text, style, rect, prevEl) |
| 8428 | : renderPlainText(hostEl, ctx, text, style, rect, prevEl); |
| 8429 | } |
| 8430 | |
| 8431 | // Avoid setting to ctx according to prevEl if possible for |
| 8432 | // performance in scenarios of large amount text. |
no test coverage detected