Make anchoring explicit and improve reusability of text pipelines

This commit is contained in:
Héctor Ramón Jiménez 2025-05-04 03:54:42 +02:00
parent d643bd5ba2
commit 6bf709e03e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
13 changed files with 423 additions and 325 deletions

View file

@ -88,6 +88,18 @@ impl text::Paragraph for () {
text::Difference::None
}
fn size(&self) -> Pixels {
Pixels(16.0)
}
fn font(&self) -> Font {
Font::DEFAULT
}
fn line_height(&self) -> text::LineHeight {
text::LineHeight::default()
}
fn align_x(&self) -> text::Alignment {
text::Alignment::Default
}
@ -96,10 +108,22 @@ impl text::Paragraph for () {
alignment::Vertical::Top
}
fn wrapping(&self) -> text::Wrapping {
text::Wrapping::default()
}
fn shaping(&self) -> text::Shaping {
text::Shaping::default()
}
fn grapheme_position(&self, _line: usize, _index: usize) -> Option<Point> {
None
}
fn bounds(&self) -> Size {
Size::ZERO
}
fn min_bounds(&self) -> Size {
Size::ZERO
}