-
Notifications
You must be signed in to change notification settings - Fork 207
StyleString
xu_whale edited this page Dec 4, 2019
·
5 revisions
富文本字符串,即带属性的字符串,除了内容之外会携带这些内容的展示样式
StyleString(string a) 创建富文本字符串
设置字体名称
给指定内容设置字体
为指定范围内的字符设置字体大小
为字符串设置字体大小
[fontStyle(FontStyle a)](https://github.com/momotech/MLN/wiki/StyleString-self-fontStyle-FontStyle)
字体样式
给部分内容设置字体样式
字体颜色
[setFontColorForRange(Color a, number b, number c)](https://github.com/momotech/MLN/wiki/StyleString-self-setFontColorForRange-Color-number-number)
给部分内容设置颜色
[backgroundColor(Color a)](https://github.com/momotech/MLN/wiki/StyleString-self-backgroundColor-Color)
背景颜色
[setBackgroundColorForRange(Color a, number b, number c)](https://github.com/momotech/MLN/wiki/StyleString-self-setBackgroundColorForRange-Color-number-number)
给部分内容设置背景颜色
[underline(UnderlineStyle a)](https://github.com/momotech/MLN/wiki/StyleString-self-underline-UnderlineStyle)
设置下划线
[setUnderlineForRange(UnderlineStyle a, number b, number c)](https://github.com/momotech/MLN/wiki/StyleString-self-setUnderlineForRange-UnderlineStyle-number-number)
给部分内容设置下划线
[showAsImage(Size a)](https://github.com/momotech/MLN/wiki/StyleString-boolean-showAsImage-Size)
以Image的形式展示,常用于图文混排
尾部追加StyleString
计算显示该内容需要的最小尺寸
设置文本内容