Make anchoring explicit and improve reusability of text pipelines
This commit is contained in:
parent
d643bd5ba2
commit
6bf709e03e
13 changed files with 423 additions and 325 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue