Skip to content

[graphics] fix none-opaque moving and resizing#21887

Merged
linev merged 10 commits intoroot-project:masterfrom
linev:fix_nonopaque_moving
Apr 14, 2026
Merged

[graphics] fix none-opaque moving and resizing#21887
linev merged 10 commits intoroot-project:masterfrom
linev:fix_nonopaque_moving

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented Apr 10, 2026

This is mode when not complete re-drawing of the pad is performed during object moving but just inverted painting of graphics primitives like line or box. While such mode is not default - it was not tested for long time and did not work properly

Adjust for prove of concept:

  • TLine::ExecuteEvent
  • TBox::ExecuteEvent
  • TPad::ExecuteEvent

To properly handle non-opaque moving and resizing.
Also significantly simplify logic for TBox and TPad and significantly reduce number of static variables there.

Provide mouse enter events for TCanvas - making symmetric with mouse leave events.
Disable toggling of feedback mode when leave canvas - while events processing can continue.

Attached is macro showing use of non-opaque mode:

hist.C.txt

@linev linev self-assigned this Apr 10, 2026
@linev linev requested a review from couet as a code owner April 10, 2026 17:25
@linev linev changed the title [graphics] fix none-opaque moving and resizeing [graphics] fix none-opaque moving and resizing Apr 10, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

Test Results

    22 files      22 suites   3d 4h 2m 22s ⏱️
 3 833 tests  3 832 ✅  1 💤 0 ❌
75 653 runs  75 635 ✅ 18 💤 0 ❌

Results for commit 8b7a638.

♻️ This comment has been updated with latest results.

linev added 7 commits April 13, 2026 09:20
Use PaintArrowNDC in the TArrow::Paint
Use attributes ModifyOn methods
Shorten options handling code
When disabled, drawing performed on complete canvas. So one should use absolute coordinates for painting.

While such situation appears in interactive painting,
support for now only line and box drawing
Let work resize/move of TBox in not-opaque mode
While such mode is not default, it was not working since a long time.
Now repair logic when and how coordiantes are set back
Like for TBox or TLine mode was not tested for long time and therefore not working
Handle all resize corners, resize sides and moving similar
@linev linev force-pushed the fix_nonopaque_moving branch from 9b27224 to 03879a0 Compare April 13, 2026 14:11
Like in TBox, use enum and current coordinates
Avoid first painting over original coordinates while
this make invert drawing wrong
@linev linev force-pushed the fix_nonopaque_moving branch from 03879a0 to d2440c3 Compare April 13, 2026 14:15
linev and others added 2 commits April 14, 2026 12:42
Even it will not be used - for symmetry such events
should be provided to TCanvas

Co-authored-by: Bertrand Bellenot <Bertrand.Bellenot@cern.ch>
Events handling can be continued also when mouse already outside canvas. Therefore keep feedback mode as is. It will be switched off/on when needed by starting objects dragging or by start painting
@linev linev requested a review from bellenot as a code owner April 14, 2026 10:43
Copy link
Copy Markdown
Member

@bellenot bellenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Sergey!

@couet
Copy link
Copy Markdown
Member

couet commented Apr 14, 2026

Ok for me also. I just tried you branch on my mac.

@linev linev merged commit 0a749dd into root-project:master Apr 14, 2026
29 of 30 checks passed
@linev linev deleted the fix_nonopaque_moving branch April 14, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants