Bellow 是使用roImageCanvas在 Roku 中显示字符串的代码
canvas = CreateObject("roImageCanvas")
port = CreateObject("roMessagePort")
canvas.SetMessagePort(port)
items = []
items.Push({
Text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s"
TextAttrs:{ font: "small", color: "#a0a0a0" ,Direction:"LeftToRight",HAlign:"Left",VAlign:"top"}
TargetRect: {x: 550, y: 75, w: 300, h: 500}
})
canvas.SetLayer(0, { Color: "#ff000000", CompositionMode: "Source" })
canvas.SetLayer(1, items)
canvas.Show()
这将创建如下输出
是否可以调整每行之间的间距?
注意:我需要使用roImageCanvas,因为这个页面需要一些带有图像的图形