docs: demonstrate name-sensitive rendering invalidation
Verify Tessera GUI / verify (push) Has been cancelled
Verify Tessera GUI / verify (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
color = "#ED6A5A"
|
||||
class GlobalPaint: RectBlock {
|
||||
function paint(self: GlobalPaint, mount: Mount, geometry: Bounds): DisplayList {
|
||||
drawing = RectBlock.paint(self,mount,geometry)
|
||||
drawing.commands.at(0).color = color
|
||||
return drawing
|
||||
}
|
||||
}
|
||||
rect = GlobalPaint(480,120,12,"#DDEEFF")
|
||||
page = Page()
|
||||
page.title = "全局名字依赖"
|
||||
page.render(Column(24,16,TextBlock("在 REPL 求值 42 不重绘;修改 color 会更新矩形颜色",2),rect))
|
||||
Reference in New Issue
Block a user