diff options
| author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-10-07 18:05:49 +0300 |
|---|---|---|
| committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-10-08 12:38:06 +0300 |
| commit | 49595ca225e838dfff2b711e17a32c16fc766c42 (patch) | |
| tree | 6febf1b8351fe889cda35e88c4b19c19ce180030 /scene/gui | |
| parent | 6916349697a4339216469e9bf5899b983d78db07 (diff) | |
| download | redot-engine-49595ca225e838dfff2b711e17a32c16fc766c42.tar.gz | |
[RTL] Remove unnecessary glyph position rounding.
Diffstat (limited to 'scene/gui')
| -rw-r--r-- | scene/gui/rich_text_label.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index b4cd201e6a..7768c2d84e 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1143,8 +1143,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o if (is_inside_tree() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) { fx_offset = fx_offset.round(); } - - Vector2i char_off = char_xform.get_origin(); + Vector2 char_off = char_xform.get_origin(); // Draw glyph outlines. const Color modulated_outline_color = font_outline_color * Color(1, 1, 1, font_color.a); @@ -1389,8 +1388,8 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o if (is_inside_tree() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) { fx_offset = fx_offset.round(); } + Vector2 char_off = char_xform.get_origin(); - Vector2i char_off = char_xform.get_origin(); Transform2D char_reverse_xform; char_reverse_xform.set_origin(-char_off); char_xform = char_xform * char_reverse_xform; |
