首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >调整文本行距brightscript

调整文本行距brightscript
EN

Stack Overflow用户
提问于 2015-05-28 05:21:13
回答 1查看 206关注 0票数 0

Bellow是使用roImageCanvas在Roku中显示字符串的代码。

代码语言:javascript
复制
 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,,因为这个页面需要一些带有图像的图形

EN

回答 1

Stack Overflow用户

发布于 2015-05-29 19:39:41

不幸的是,在roImageCanvas上控制间距的唯一方法是使用自己的TargetRects将文本拆分成单独的字符串。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30497809

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档