[graphics] modernize BBox handling in several classes#22167
Draft
linev wants to merge 7 commits intoroot-project:masterfrom
Draft
[graphics] modernize BBox handling in several classes#22167linev wants to merge 7 commits intoroot-project:masterfrom
linev wants to merge 7 commits intoroot-project:masterfrom
Conversation
Test Results 22 files 22 suites 3d 13h 52m 31s ⏱️ For more details on these failures, see this check. Results for commit 9e333a1. |
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.
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
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.
Idea to have more consistent implementation.
Also facing problem of TPad::PixeltoY() method - it does not do that it promise