API ReferenceText & Media
TextDecoration
Underline, overline, and strikethrough flags with styles.
Bitflags over u8 — combine with BitOr, intersect with BitAnd, test
with contains. The runnable program below combines two flags.
BitOr / BitAnd combine and intersect.
| Flag | Bit | Effect |
|---|---|---|
NONE | 0 | No decoration |
UNDERLINE | 1 | Line below text |
OVERLINE | 2 | Line above text |
LINE_THROUGH | 4 | Strikethrough |
use incular::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let app = Application::new(|_cx| {
Container::builder()
.padding(EdgeInsets::all(24.0))
.alignment(Alignment::CENTER)
.child(
Text::new("Underlined and struck").style(
TextStyle::new()
.decoration(TextDecoration::combine(&[
TextDecoration::UNDERLINE,
TextDecoration::LINE_THROUGH,
]))
.decoration_style(TextDecorationStyle::Wavy)
.decoration_thickness(1.0),
),
)
.build()
.into()
})?;
incular::run(app)?;
Ok(())
}IconData font icons (IconData::new(code_point) with family,
font_package, match_text_direction, variations) render through the text
pipeline — see Icon.