Skip to content

Commit

Permalink
text: Add render_layout_line
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh committed Oct 16, 2024
1 parent a7b3b0d commit 2c2d418
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/src/display_object/edit_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,12 @@ impl<'gc> EditText<'gc> {
}
}

fn render_layout_line(self, context: &mut RenderContext<'_, 'gc>, line: &LayoutLine<'gc>) {
for layout_box in line.boxes_iter() {
self.render_layout_box(context, layout_box);
}
}

/// Render a layout box, plus its children.
fn render_layout_box(self, context: &mut RenderContext<'_, 'gc>, lbox: &LayoutBox<'gc>) {
let origin = lbox.interior_bounds().origin();
Expand Down Expand Up @@ -2370,8 +2376,8 @@ impl<'gc> TDisplayObject<'gc> for EditText<'gc> {
..Default::default()
});

for layout_box in edit_text.layout.boxes_iter() {
self.render_layout_box(context, layout_box);
for line in edit_text.layout.lines() {
self.render_layout_line(context, line);
}

self.render_debug_boxes(
Expand Down

0 comments on commit 2c2d418

Please sign in to comment.