Skip to content

Commit

Permalink
text: Take the gutter into account when masking text
Browse files Browse the repository at this point in the history
Flash Player does not render text over the gutter.
  • Loading branch information
kjarosh committed Oct 14, 2024
1 parent 2fe5483 commit 61f5c1b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/display_object/edit_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2300,9 +2300,9 @@ impl<'gc> TDisplayObject<'gc> for EditText<'gc> {

context.commands.push_mask();
let mask = Matrix::create_box(
edit_text.bounds.width().to_pixels() as f32,
(edit_text.bounds.width() - Self::GUTTER_WIDTH * 2).to_pixels() as f32,
edit_text.bounds.height().to_pixels() as f32,
Twips::ZERO,
Self::GUTTER_WIDTH,
Twips::ZERO,
);
context.commands.draw_rect(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/tests/swfs/text/auto_size/return/output.expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61f5c1b

Please sign in to comment.