parent
84affa96ff
commit
1f611a9c90
10 changed files with 184 additions and 44 deletions
|
@ -432,6 +432,19 @@ impl TextLayout {
|
|||
pub fn line_height(&self) -> Pixels {
|
||||
self.0.lock().as_ref().unwrap().line_height
|
||||
}
|
||||
|
||||
/// todo!()
|
||||
pub fn text(&self) -> String {
|
||||
self.0
|
||||
.lock()
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.lines
|
||||
.iter()
|
||||
.map(|s| s.text.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
}
|
||||
}
|
||||
|
||||
/// A text element that can be interacted with.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue