跳到正文

Text

使用继承的排版、文本选择和无障碍属性来排版并绘制 Unicode 文本。

正在加载交互演示…

#导入

从 quickgui 导入 text。

use quickgui::*;

#用法

text("Hello from Rust").text_lg()

#API 参考

展开条目查看说明和完整签名。短横线表示声明中未记录默认值。

pub fn text(content: impl Into<Arc<str>>) -> Element

Create a text element. Strings are owned through `Arc<str>` and cheap to retain.

text_colorpub fn text_color(mut self, color: Color) -> Self—

Configures text color for this part.

pub fn text_color(mut self, color: Color) -> Self
查看源码
childpub fn child(mut self, child: impl IntoElement) -> Self—

Configures child for this part.

pub fn child(mut self, child: impl IntoElement) -> Self
查看源码