-
Notifications
You must be signed in to change notification settings - Fork 961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly apply translation and clipping in TextRenderer #4525
Merged
Conversation
This file contains 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
Translation and clipping should only be applied from Graphics objects when they are explicitly asked for in the TextFormatFlags. Adds regression tests. Fixes dotnet#4524
JeremyKuhne
added
💥 regression-preview
Regression from a preview release
Servicing-consider
.NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria
labels
Feb 4, 2021
Codecov Report
@@ Coverage Diff @@
## release/5.0 #4525 +/- ##
=====================================================
- Coverage 68.27969% 68.27240% -0.00729%
=====================================================
Files 1421 1421
Lines 510635 510713 +78
Branches 41577 41580 +3
=====================================================
+ Hits 348660 348676 +16
- Misses 155620 155679 +59
- Partials 6355 6358 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
RussKie
approved these changes
Feb 4, 2021
RussKie
added
🚫 * NO-MERGE *
The PR is not ready for merge yet (see discussion for detailed reasons)
Servicing-approved
.NET Shiproom approved the PR for merge
and removed
Servicing-consider
.NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria
labels
Feb 4, 2021
RussKie
removed
the
🚫 * NO-MERGE *
The PR is not ready for merge yet (see discussion for detailed reasons)
label
Feb 10, 2021
RussKie
pushed a commit
that referenced
this pull request
Feb 10, 2021
FYI this change has a caused a regression in the |
RussKie
added a commit
to RussKie/winforms
that referenced
this pull request
Mar 2, 2021
The fix introduced in dotnet#4525 has redirected the `PropertyGrid` value rendering through a different code path which only relies on flags passed into `DrawTextInternal` completely side-stepping any modifications applied to the `Graphics` object. However the `PropertyGrid` value rendering routines do modify the `Graphics` object (applying clipping and transformations) but do not pass the necessary flags to `DrawTextInternal`. Fix by applying the necessary flags to preserve the `Graphics` modifications, and add debug-time asserts to check that necessary flags are applies, if the underlying `Graphics` object is modified. Fixes dotnet#4593
RussKie
added a commit
that referenced
this pull request
Mar 2, 2021
The fix introduced in #4525 has redirected the `PropertyGrid` value rendering through a different code path which only relies on flags passed into `DrawTextInternal` completely side-stepping any modifications applied to the `Graphics` object. However the `PropertyGrid` value rendering routines do modify the `Graphics` object (applying clipping and transformations) but do not pass the necessary flags to `DrawTextInternal`. Fix by applying the necessary flags to preserve the `Graphics` modifications, and add debug-time asserts to check that necessary flags are applies, if the underlying `Graphics` object is modified. Fixes #4593
RussKie
added a commit
to RussKie/winforms
that referenced
this pull request
Mar 2, 2021
The fix introduced in dotnet#4525 has redirected the `PropertyGrid` value rendering through a different code path which only relies on flags passed into `DrawTextInternal` completely side-stepping any modifications applied to the `Graphics` object. However the `PropertyGrid` value rendering routines do modify the `Graphics` object (applying clipping and transformations) but do not pass the necessary flags to `DrawTextInternal`. Fix by applying the necessary flags to preserve the `Graphics` modifications, and add debug-time asserts to check that necessary flags are applies, if the underlying `Graphics` object is modified. Fixes dotnet#4593 (cherry picked from commit 34cdcf6)
RussKie
added a commit
that referenced
this pull request
Mar 10, 2021
The fix introduced in #4525 has redirected the `PropertyGrid` value rendering through a different code path which only relies on flags passed into `DrawTextInternal` completely side-stepping any modifications applied to the `Graphics` object. However the `PropertyGrid` value rendering routines do modify the `Graphics` object (applying clipping and transformations) but do not pass the necessary flags to `DrawTextInternal`. Fix by applying the necessary flags to preserve the `Graphics` modifications, and add debug-time asserts to check that necessary flags are applies, if the underlying `Graphics` object is modified. Fixes #4593 (cherry picked from commit 34cdcf6)
ghost
locked as resolved and limited conversation to collaborators
Jan 29, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
💥 regression-preview
Regression from a preview release
Servicing-approved
.NET Shiproom approved the PR for merge
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.
Translation and clipping should only be applied from Graphics objects when they are explicitly asked for in the TextFormatFlags.
Adds regression tests.
Fixes #4524
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
After
Test methodology
Microsoft Reviewers: Open in CodeFlow