Skip to content

[graphics] improve line, text, ellipse execute events#22222

Open
linev wants to merge 18 commits into
root-project:masterfrom
linev:bbox_continue
Open

[graphics] improve line, text, ellipse execute events#22222
linev wants to merge 18 commits into
root-project:masterfrom
linev:bbox_continue

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented May 11, 2026

These are classes which has special handling for non-opaque moving
In previous ROOT versions only simple line can be painted in such mode
This makes implementation of classes like TEllipse ugly.

Add support of invert mode in all relevant painter places:

  • TPadPainter
  • TGLPadPaint
  • TGQuartz xor mode for polymarker and polyline

Provide unified painting of TEllipse for normal and interactive drawing.
Fix errors with absolute coordinates in TText and TLine.

Remove gVirtualX usage from all mentioned classses

@linev linev self-assigned this May 11, 2026
@linev linev requested review from couet, dpiparo and pcanal as code owners May 11, 2026 10:56
@linev linev marked this pull request as draft May 11, 2026 10:56
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

Test Results

    22 files      22 suites   3d 10h 46m 54s ⏱️
 3 852 tests  3 801 ✅ 0 💤 51 ❌
76 977 runs  76 926 ✅ 0 💤 51 ❌

For more details on these failures, see this check.

Results for commit 536e230.

♻️ This comment has been updated with latest results.

@linev linev marked this pull request as ready for review May 12, 2026 13:42
linev added 17 commits May 13, 2026 07:13
DistanceToPrimitive, GetBoundingBox and ExecuteEvent
have to use absolute pixel coordinates.
For non-opaque moving rectangle and marker are drawn.
Use provided base-class methods
to recalculate pixels to text coordinates
There are several places where such method are used. First is BBox handling, second is ExecuteEvent handling
Allow to keep usage of NDC.
Use new methods for coordinates calculation
Use new methods for coordinate conversion
First fill points for painting in the vectors and then perform painting.
This clarify paint procedure and let
reuse same code in other place
Significantly reduce number of static variables,
use markers and FillPoints method to produce
painting points for non-opaque paint.
Fully avoid gVirtualX
It is used not by TEllipse, can be used in other classes
Provide helper method to draw polymarkers in both
interactive and normal mode
Used now by some classes like TEllipse in ExecuteEvent
Now all 4 markers can be drawn together.
Simplify logic how borders are handled, handle swap
Fix coordinates calculation
Allow to draw marker also from ExecuteEvent
Move line and fill attributes handling in
QuartzMarker util - avoid code duplication
Used in many ExecuteEvent methods therefore
better handle single points buffer with line attributes
instead of multiple calls to gVirtualX->DrawLine
TGQuartz use internal vector for coordinates conversion
Do not keep it while vector can be deleted afterwards
It is more direct usage of line drawings in GL instead of using `glRectd` with disabled polygon drawing
Now TEllipse paint at least 36 points when full 2Pi angle is covered
Updating SVG which include ellipses
Update tlatex0 ref values while it make small dots
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.

1 participant