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 ,因为此页面需要一些带图像的图形
答案 0 :(得分:1)
不幸的是,控制roImageCanvas间距的唯一方法是将文本分解为具有自己的TargetRects的单独字符串。