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

Change the lumens overlay for more consistent rendering #3911

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Apr 10, 2023

Identify the Bug or Feature request

Addresses #3907

Description of the Change

We now render only disjoint lumens levels rather than relying on AlphaComposite.Src to erase prior rendering. Using the disjoint areas also means the boundaries can be draw overtop the various lumens levels rather than being interleaved. The boundaries are also now rendered as black regardless of the overlay opacity, and the stroke has been changed to use rounded corners as they have a little more consistent appearance at different zoom levels.

The Illumination class has been refactored a bit to keep it more focused. It no longer exposes the base list of LumensLevel that it was created from (getLumensLevels()), but instead returns only those results that are meaningful to callers (getObscuredLumensLevels() and getDisjointObscuredLumensLevels()). This also includes moving the logic for incorporating extra lights (e.g., personal lights) out of ZoneView and into Illumination.withExtraLights(). The documentation has also been increased to clarify the meaning of each result.

Possible Drawbacks

Should be none.

Documentation Notes

N/A

Release Notes

N/A


This change is Reviewable

We now render only disjoint lumens levels rather than relying on `AlphaComposite.Src` to erase prior rendering. Using
the disjoint areas also means the boundaries can be draw overtop the various lumens levels rather than being
interleaved. The boundaries are also now rendered as black regardless of the overlay opacity, and the stroke has been
changed to use rounded corners as they are a little more consistent.

The `Illumination` class has been refactored a bit to keep it as focused as possible. It no longer exposes the base list
of `LumensLevel` that it was created from, but instead returns only those results that are meaningful to
callers (obscured lumens levels and disjoint obscured lumens levels). This also involved moving the logic for
incorporating extra lights (e.g., personal lights) out of `ZoneView` and into `Illumination`. The documentation has also
been increased to clarify the meaning of each result, as they are similar but distinct.
@kwvanderlinde kwvanderlinde force-pushed the bugfix/3907-lumens-overlay-border-artifacts branch from bc7dd0e to a54fb42 Compare April 13, 2023 00:02
@cwisniew cwisniew merged commit aeaee8c into RPTools:develop Apr 13, 2023
@kwvanderlinde kwvanderlinde deleted the bugfix/3907-lumens-overlay-border-artifacts branch April 13, 2023 04:50
@cwisniew cwisniew added the bug label Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants