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
dx: add support for inverting all types of cursor #9665
Conversation
TSE is not yet done. TSM needs some socialization. |
I wonder if I should get the DX parts reviewed separately. |
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
oh ffs. |
f51d657
to
4f59cf8
Compare
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
😱 what just happened ? |
HAHAHAHAHA I guess github has an event type for "deleted base branch"... so if you reopen it, and then CHANGE the base branch . . . it gets the wrong name |
This commit introduces support for inverting all types of cursor. To invert the display without re-rendering any text, we draw the cursor into a command list and then compose the command list with the existing renderer using the MASK_XOR composition flag. This wouldn't normally work with our renderer because there is no _background_ color to invert in some cases (such as when acrylic is in use.) To work around that, we're taking advantage of @zadjii-msft's two-pass cursor renderer. To properly invert the cursor over a transparent background: (Examples are given below for two cursor types, but this applies to all of them.) First, we'll draw a "backplate" in the user's requested background color (with the alpha channel set to 0xFF). (`firstPass` == true) EMPTY BOX FILLED BOX ===== ===== = = ===== = = ===== = = ===== ===== ===== Second, the glyph is drawn (outside of the cursor renderer). EMPTY BOX FILLED BOX ==A== ==A== =A A= =A=A= AAAAA AAAAA A A A===A A===A A===A Last, we'll draw the cursor again in all white and use that as the *mask* for XORing the already-drawn pixels. (`firstPass` == false) (# = mask, a = inverted A) EMPTY BOX FILLED BOX ##a## ##a## #A A# #a#a# aAAAa aaaaa a a a###a a###a a###a Fixes #9610
dfd6d99
to
77aa19e
Compare
I've pulled the Terminal Settings stuff out of this PR. |
Misspellings found, please review:
To accept these changes, run the following commands from this repository on this branch
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbage and it relates to a binary-ish string, please add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!
I'm not going to close 9610 until we get the TSM parts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intriguing. I do love me some diagrams in comments
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
How would you use this cursor style? |
This commit introduces support for inverting all types of cursor.
To invert the display without re-rendering any text, we draw the cursor
into a command list and then compose the command list with the existing
renderer using the MASK_INVERT composition flag.
This wouldn't normally work with our renderer because there is no
background color to invert in some cases (such as when acrylic is in
use.)
To work around that, we're taking advantage of @zadjii-msft's two-pass
cursor renderer.
To properly invert the cursor over a transparent background:
(Examples are given below for two cursor types, but this applies to all
of them.)
First, we'll draw a "backplate" in the user's requested background color
(with the alpha channel set to 0xFF). (
firstPass
== true)Second, the glyph is drawn (outside of the cursor renderer).
Last, we'll draw the cursor again in all white and use that as the
mask for inverting the already-drawn pixels. (
firstPass
== false) (#= mask, a = inverted A)
Related to #9610
Validation Steps Performed
Manual visual validation in all configurations.