这么画的其他内容,只留下了画的代码,其他的省略了:
class myCellType extends GC.Spread.Sheets.CellTypes.Text{
...
paintContent(ctx, value, x, y, w, h, style, context){
let oldFont = style.font
style.font = 'normal 8pt verdana'
GC.Spread.Sheets.CellTypes.Text.prototype.paintContent.call(this, ctx, 'ABC', x, y, 10, h, style, context)
style.font = oldFont
GC.Spread.Sheets.CellTypes.Text.prototype.paintContent.call(this, ctx, value, x+20, y, w-20, h, style, context)
}
...
} |