Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Improve rendering of focus rects and debug rects #16259

Merged
merged 4 commits into from
May 8, 2024

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented May 8, 2024

Related to #5443.

This PR improves rendering of focus highlights and debug rects:

  1. debug rects do not have missing corners anymore [1],
  2. focus rects (focus highlights) do not require updating a drawing anymore as they now use primitive commands,
  3. focus rects now work properly when an object is transformed (the highlight follows the object),
  4. focus rects do not scale with the rest of the content (they always have 3px, as in FP) [2].
Before After Notes
[1]
[2], fullscreen

The test focus_highlight_move verifies the third point.

kjarosh added 4 commits May 9, 2024 00:00
This method may be used to efficiently draw a simple rectangle outline
for debug rects and focus rects.
This improves debug rect rendering so that debug rects
do not have missing corners as before.
This ensures that highlight does not become outdated
(e.g. when the highlighted content moves).
Additionally, it makes the highlight have 3px independently of zoom.
This test verifies the behavior of focus hightlight when the
focused element is transformed; additionally, it verifies how
the active highlight behaves when _focusrect is set to false.
@Dinnerbone Dinnerbone merged commit cc33161 into ruffle-rs:master May 8, 2024
17 checks passed
@kjarosh kjarosh deleted the highlight-move branch May 8, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants