Draft Editor API and TextEditor widget

This commit is contained in:
Héctor Ramón Jiménez 2023-09-12 14:51:00 +02:00
parent 346af3f8b0
commit 6448429103
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
25 changed files with 1384 additions and 92 deletions

View file

@ -120,12 +120,25 @@ impl<'a> Layer<'a> {
} => {
let layer = &mut layers[current_layer];
layer.text.push(Text::Managed {
layer.text.push(Text::Paragraph {
paragraph: paragraph.clone(),
position: *position + translation,
color: *color,
});
}
Primitive::Editor {
editor,
position,
color,
} => {
let layer = &mut layers[current_layer];
layer.text.push(Text::Editor {
editor: editor.clone(),
position: *position + translation,
color: *color,
});
}
Primitive::Text {
content,
bounds,