Skip to content

Introduce GetPadWidth() and GetPadHeight() methods#22072

Open
linev wants to merge 5 commits intoroot-project:masterfrom
linev:pad_width_height
Open

Introduce GetPadWidth() and GetPadHeight() methods#22072
linev wants to merge 5 commits intoroot-project:masterfrom
linev:pad_width_height

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented Apr 27, 2026

For a long time gPad->XtoPixel(gPad->GetX2()); and gPad->YtoPixel(gPad->GetY1()); were used.
This is not very user-friendly.

Instead use canvas width and height multiplied by GetAbsWNDC() and GetAbsHNDC() respectively.

Adjust in several places in source code - especially around text size conversions.

linev added 5 commits April 27, 2026 10:45
It is clear functions to obtain pad dimension - disregard if it is
sub-pad or canvas itself.
Text size need to be scaled with pad width or height. So this is first place where new methods can be used
@linev linev self-assigned this Apr 27, 2026
@linev linev requested a review from hageboeck as a code owner April 27, 2026 09:29
@linev linev requested review from couet, dpiparo and pcanal as code owners April 27, 2026 09:29
@github-actions
Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 11h 33m 34s ⏱️
 3 849 tests  3 796 ✅  1 💤 52 ❌
76 910 runs  76 840 ✅ 18 💤 52 ❌

For more details on these failures, see this check.

Results for commit 583c8e1.

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.

2 participants