设置了文本换行后,如何给多行文本每一行行文本设置下划线 #2951
Closed
Create-Peace
started this conversation in
General
Replies: 2 comments
-
class CustomColCell extends ColCell {
initCell() {
super.initCell();
// 绘制下划线
const rects = this.getTextLineBoundingRects()
}
} import { renderLine } from '@antv/s2'
rects.forEach((rect) => {
renderLine(this, {
// 传入 x1, y1 等配置, 将图形绘制在 Canvas 中
})
}) 参考 S2/packages/s2-core/src/cell/base-cell.ts Lines 525 to 533 in a4ae432 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
设置了文本换行,多行文本,如何给每一行文本设置下划线
Beta Was this translation helpful? Give feedback.
All reactions