Skip to content

[graphics] modernize BBox handling in several classes#22167

Draft
linev wants to merge 7 commits intoroot-project:masterfrom
linev:less_virtualx
Draft

[graphics] modernize BBox handling in several classes#22167
linev wants to merge 7 commits intoroot-project:masterfrom
linev:less_virtualx

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented May 6, 2026

Idea to have more consistent implementation.

Also facing problem of TPad::PixeltoY() method - it does not do that it promise

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

github-actions Bot commented May 6, 2026

Test Results

    22 files      22 suites   3d 13h 52m 31s ⏱️
 3 847 tests  3 784 ✅   0 💤 63 ❌
75 989 runs  75 780 ✅ 126 💤 83 ❌

For more details on these failures, see this check.

Results for commit 9e333a1.

linev added 2 commits May 7, 2026 07:09
Exclude gVirtualX usage, invoke pad painter methods insted
Fully support NDC and normal coordiantes during moving
Like line drawing, one should use absolute coordinates when non-opaque drawing enabled.
@linev linev force-pushed the less_virtualx branch from 9e333a1 to f22fa13 Compare May 7, 2026 05:24
linev added 5 commits May 7, 2026 08:11
For many classes it is good guess that center of
bbox is geometrical center. So one not need to
reimplement it many times - just reuse values from GetBBox.

And when setting bbox center - one can directly
call setx and sety methods. Other classes will be updated correspondently

Also provide convenience methods to convert pad coordinates into
X and Y user coordinates - or NDC. While these methods used very often.
One has to use absolute coordinates
Support NDC coordinates
Implement only few methods,
other reusing them

Simplify code by very large extend
One not need to redefine similar methods - now base class
helps us
TLine defines now less virtual methods
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