[graf2d] Change TCanvas arguments to canvas size#21156
Draft
rlalik wants to merge 1 commit intoroot-project:masterfrom
Draft
[graf2d] Change TCanvas arguments to canvas size#21156rlalik wants to merge 1 commit intoroot-project:masterfrom
rlalik wants to merge 1 commit intoroot-project:masterfrom
Conversation
In the previous version, constructor arguments were the window size. It caused some issues when the canvas created in batch and interactive mode as a result had different sizes, and some manual workarounds were required. It then also causes issue with saving resized canvas to macro as in the batch mode the size change was not preserved. Some of the discussions are https://root-forum.cern.ch/t/title-and-label-size-scaling-inconsistent-behaviour/64168 and https://root-forum.cern.ch/t/set-tcanvas-size-in-batch-mode/6626. Since the window decorations sizes are known and hardcoded one can reverse the old logic of determining the canvas size from window, to determine window size from canvas.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the current ROOT,
TCanvasconstructor arguments were the window size. It caused some issues when the canvas created in batch and interactive mode as a result had different sizes, and some manual workarounds were required. It then also causes issue with saving resized canvas to macro as in the batch mode the size change was not preserved. Some of the discussions are https://root-forum.cern.ch/t/title-and-label-size-scaling-inconsistent-behaviour/64168 and https://root-forum.cern.ch/t/set-tcanvas-size-in-batch-mode/6626 and also #11004. Since the window decorations sizes are known and hardcoded one can reverse the old logic of determining the canvas size from window, to determine window size from canvas.This Pull request:
TCanvasconstructorsChanges or fixes:
TCanvasconstructor argumentswwandwhrenamed tocwandch- now, their meaning is the canvas size, not the window sizeTCanvasclass to handle the new loginChecklist:
This PR fixes #11004