Skip to content
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

Window Extensions, MarkColorAsTransparent does not make the color hit-test transparent #1

Open
DiegoG1019 opened this issue May 23, 2022 · 0 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@DiegoG1019
Copy link
Owner

Problem

When marking a specific color as transparent with SDL2.NET.Extensions.Windows.WindowExtensions.MarkColorAsTransparent(this Window, RGBColor), and rendering the color on-screen, the colored pixels are transparent to what's behind it -- However, hit-tests still act upon the Window

Expected Behaviour

For the window to be transparent both graphics-wise and to hit-tests

Reproduction

// ...
var app = SDLApplication.Instance();
RGBColor background = new RGBColor(1, 1, 255);
app.MainWindow.MarkColorAsTransparent(background);
// ...
while (true)
{
	app.UpdateEvents();
	app.Clear(background);
}

Using this code, you should notice that while the screen does become completely transparent, the Window still takes ownership of Hit Tests on it

Notes

Possibly a problem with color encoding in SDL2.NET.RGBColor.ToUInt32. The old way is commented out right above it, and... it kinda works in the opposite way: The color is NOT set as transparent, instead drawn normally on-screen; but the Window is transparent to hit tests

@DiegoG1019 DiegoG1019 added bug Something isn't working help wanted Extra attention is needed labels May 23, 2022
@DiegoG1019 DiegoG1019 self-assigned this May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant